请同志们提供一种素数的最简编程方式.
再加一层循环不就可以了,
例:100以内的:
for a=1 to 100
for i=2 to int(a/2)
if a%i=0
exit
endif
endfor
if i=int(a/2)+1
? a
endif
endfor
for a=1 to 100
for i:=2 to int(a/2)
if a%i=0
exit
endif
endfor
if i=int(a/2)+1
? a
endif
endfor