14 lines
271 B
Text
14 lines
271 B
Text
print "Primes below 100\n"
|
|
for i = 2 to 100
|
|
if wilson_prime(i) print i, " ";
|
|
next i
|
|
|
|
sub wilson_prime(n)
|
|
local i, fct
|
|
|
|
fct = 1
|
|
for i = 2 to n-1
|
|
fct = mod((fct * i), n)
|
|
next i
|
|
if fct = n-1 then return True else return False : fi
|
|
end sub
|