在列表框中输出100-200之间的素数。 VB 必须在列表框输出

2025-03-06 19:44:15
推荐回答(1个)
回答1:

n=0
for i=100 to 200
for j=2 to i-1
if(i%j==0) then
exit
endif
endfor
if j==i then
list1.additem(n)
endif
endfor