Update euler3.php
This commit is contained in:
parent
8822f3cc79
commit
7c1a793bf6
|
@ -9,7 +9,7 @@ function largestPrimeFactorOf($number){
|
||||||
$primesNumbers=array(2);//non considering value 1
|
$primesNumbers=array(2);//non considering value 1
|
||||||
$i=3; //begin to 3
|
$i=3; //begin to 3
|
||||||
|
|
||||||
while($i<sqrt($number)){
|
while($i<=sqrt($number)){
|
||||||
//echo $i;
|
//echo $i;
|
||||||
//is $i a factorOf $number
|
//is $i a factorOf $number
|
||||||
if(fmod($number,$i)==0){
|
if(fmod($number,$i)==0){
|
||||||
|
@ -36,4 +36,4 @@ function largestPrimeFactorOf($number){
|
||||||
}else{
|
}else{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user