Largest prime factor: Difference between revisions

Added 11l
m (Fixed indentation)
(Added 11l)
Line 5:
<br>What is the largest prime factor of the number 600851475143 ?
<br><br>
 
=={{header|11l}}==
{{trans|Python}}
 
<syntaxhighlight lang="11l">
F isPrime(n)
L(i) 2 .. Int(n ^ 0.5)
I n % i == 0
R 0B
R 1B
 
V n = 600851475143
V j = 3
L !isPrime(n)
I n % j == 0
n I/= j
j += 2
print(n)
</syntaxhighlight>
 
{{out}}
<pre>
6857
</pre>
 
=={{header|ALGOL 68}}==
1,481

edits