Skip to content

Commit 8cc8cd3

Browse files
committed
Merge branch 'JoshJ-IsPrime' of https://github.com/code4tomorrow/java into JoshJ-IsPrime
2 parents 4e383b5 + cde751f commit 8cc8cd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/codefortomorrow/advanced/chapter13/solutions/PrimePractice.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static void main(String[] args) {
2727
if (number != -1) {
2828
if (isPrime(number, 2)) {
2929
System.out.println("That is a prime!");
30-
} else {
30+
} else {
3131
System.out.println("Not a prime!");
3232
}
3333
}
@@ -46,7 +46,7 @@ public static boolean isPrime(int n, int z) {
4646
if (n <= 2) {
4747
return n == 2;
4848
}
49-
49+
5050
// If n is divisible by the current divisor,
5151
// it has a factor other than 1 and thus is
5252
// not prime

0 commit comments

Comments
 (0)