Skip to content

Commit 9c880b5

Browse files
authored
Merge pull request TheAlgorithms#978 from Spikatrix/patch-1
Improved grammar and whitespace for prompts
2 parents 0f2f586 + 5e7dad9 commit 9c880b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Maths/PrimeCheck.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ public class PrimeCheck {
66
public static void main(String[] args) {
77
Scanner scanner = new Scanner(System.in);
88

9-
System.out.println("Enter n:");
9+
System.out.print("Enter a number: ");
1010
int n = scanner.nextInt();
1111
if (isPrime(n)) {
12-
System.out.println(n + "is prime number");
12+
System.out.println(n + " is a prime number");
1313
} else {
14-
System.out.println(n + "is not prime number");
14+
System.out.println(n + " is not a prime number");
1515
}
1616
}
1717

1818
/***
19-
* Check a number is prime or not
19+
* Checks if a number is prime or not
2020
* @param n the number
2121
* @return {@code true} if {@code n} is prime
2222
*/

0 commit comments

Comments
 (0)