Minimum primes: Difference between revisions

Content added Content deleted
m (→‎{{header|Ring}}: streamlined)
m (→‎{{header|Ring}}: simplified nxtPrime())
Line 199: Line 199:


func nxtPrime(x)
func nxtPrime(x)
iscomp = true j = 2
j = 2
while iscomp
while true
if x % j = 0 j = 2 x++
if x % j = 0 j = 2 x++
else j++ ok
else j++ ok
if j * j > x ispr = false exit ok
if j * j > x exit ok
end return string(x)</lang>
end return string(x)</lang>
{{out}}
{{out}}