15 lines
325 B
Text
15 lines
325 B
Text
for i = 1 to 99
|
|
if isPrime(i) then print string(i); " ";
|
|
next i
|
|
end
|
|
|
|
function isPrime(v)
|
|
if v < 2 then return False
|
|
if v mod 2 = 0 then return v = 2
|
|
if v mod 3 = 0 then return v = 3
|
|
d = 5
|
|
while d * d <= v
|
|
if v mod d = 0 then return False else d += 2
|
|
end while
|
|
return True
|
|
end function
|