fix to bug in CheckPrime

This commit is contained in:
Moshood Joshua 2021-01-04 20:51:24 +01:00 committed by emlycool
parent dd70b86e62
commit c469000cc0

View File

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