We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0f2f586 + 5e7dad9 commit 9c880b5Copy full SHA for 9c880b5
Maths/PrimeCheck.java
@@ -6,17 +6,17 @@ public class PrimeCheck {
6
public static void main(String[] args) {
7
Scanner scanner = new Scanner(System.in);
8
9
- System.out.println("Enter n:");
+ System.out.print("Enter a number: ");
10
int n = scanner.nextInt();
11
if (isPrime(n)) {
12
- System.out.println(n + "is prime number");
+ System.out.println(n + " is a prime number");
13
} else {
14
- System.out.println(n + "is not prime number");
+ System.out.println(n + " is not a prime number");
15
}
16
17
18
/***
19
- * Check a number is prime or not
+ * Checks if a number is prime or not
20
* @param n the number
21
* @return {@code true} if {@code n} is prime
22
*/
0 commit comments