编程输出200到300之间的所有素数

2024-12-30 22:12:15
推荐回答(2个)
回答1:

clear
for i=200 to 300
for j=2 to i-1
if i%j=0
exit
endif
endfor
if j=i
?i
endif
endfor
return

回答2:

clear
for
i=200
to
300
for
j=2
to
i-1
if
i%j=0
exit
endif
endfor
if
j=i
?i
endif
endfor
return