Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 899109e

Browse files
HKalbasijakobkogler
authored andcommitted
fix a typo (#424)
1 parent b98a3a7 commit 899109e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/algebra/primality_tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If it is a divisor, than $n$ is definitely not prime, otherwise it is.
1717
```cpp
1818
bool isPrime(int x) {
1919
for (int d = 2; d * d <= x; d++) {
20-
if (x % d == 2)
20+
if (x % d == 0)
2121
return false;
2222
}
2323
return true;

0 commit comments

Comments
 (0)