急需!!!VB高手,帮忙解决一道编程题目,万分感谢

2024-12-25 02:55:31
推荐回答(2个)
回答1:

private sub cmd1_clixk()
dim i,j
if op1.value=ture then
for i=100 to 200
for j=2 to i-1
if i mod j=0 then exit for
next j
text1=text1+str(i)
next i
elseif op2.value=ture then
for i=200 to 400
for j=2 to i-1
if i mod j=0 then exit for
next j
text1=text1+str(i)
next i
end sub
private sub cmd2_click()
open app.path+"out.txt" for append as#1
print#1,text1
close
end sub

回答2: