Thanks to visit codestin.com Credit goes to github.com
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.
1 parent b98a3a7 commit 899109eCopy full SHA for 899109e
src/algebra/primality_tests.md
@@ -17,7 +17,7 @@ If it is a divisor, than $n$ is definitely not prime, otherwise it is.
17
```cpp
18
bool isPrime(int x) {
19
for (int d = 2; d * d <= x; d++) {
20
- if (x % d == 2)
+ if (x % d == 0)
21
return false;
22
}
23
return true;
0 commit comments