Skip to content

Commit 2618a64

Browse files
committed
Added Goldbach's Conjecture algorithm.
1 parent 0ad77ae commit 2618a64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/thealgorithms/maths/GoldbachConjecture.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public static void main(String[] args) {
4444
if (n % 2 == 0 && n > 2) {
4545
for (int i = 0; i <= n / 2 && flag == 0; i++) {
4646
if (isPrime(i) && isPrime(n - i)) {
47-
System.out.println(format("%d + %d = %d", i, n - i, n));
48-
flag = 1;
47+
System.out.println(format("%d + %d = %d", i, n - i, n));
48+
flag = 1;
4949
}
5050
}
5151
} else {

0 commit comments

Comments
 (0)