+ 1
Helpz!
well, i need to find the largest prime factor of 600851475143. But my code only return the second largest prime factor. https://code.sololearn.com/W67E6HXBvH9I/?ref=app
2 Answers
0
var i=600851475143,z=2,d;
while (z<=i){
if (i%z===0){
i/=z;
d=z;
z=1;
}
z+=1;
}
document.write (d);
0
thank you ^^