n=val(thisform.text1.value)
for i=2 to n-1
if n%i=0
thisform.label2.caption= "不是素数 "
else
thisform.label2.caption= "是素数 "
endif
endfor
------解决方案--------------------------------------------------------
n=val(thisform.text1.value)
a= "b是素数 "
for i=2 to n-1
if mod(n,i)=0
a= "是素数 "
exit
else
loop
endif
endfor
thisform.label2.caption=a