fix to bug in CheckPrime

This commit is contained in:
Moshood Joshua 2021-01-04 20:51:24 +01:00 committed by GitHub
parent db62b76ec2
commit 1705425690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ function isPrime(int $number)
} }
$i = 3; $i = 3;
while ($i < sqrt($number)) { while ($i <= sqrt($number)) {
if ($number % $i === 0) { if ($number % $i === 0) {
return false; return false;
} }