Vb Do while|until…Loop 循环语句

输出100-200间能被3整除或者能被5整除的数据,以“sy6-4.vbp”和“sy6-4.frm”文件名保存。帮帮忙 ··

第1个回答  2012-02-13
i=100
do while i<=200
if i mod 3=0 or i mod 5=0 then print i
i=i+1
loop本回答被提问者和网友采纳
第2个回答  2012-02-13
private sub test()
dim i%
i=100
do while i<=200
if test=true then
debug.print i
end if
i=i+1
loop
end sub
private function test(byref i%) as boolean
if val(i mod 3 or i mod 5)=0 then
test=true
end if
end function
第3个回答  2012-02-13
dim i=100,
do while
if (i++MOD5 or i++MOD3)==0 then
print:"i"
loop
第4个回答  2012-02-13
求整除的问题,用取余数判断是否为零
相似回答