编写一个vb程序,输出100~200之间不能被3整除的数…

while语句
2024-12-13 00:39:54
推荐回答(2个)
回答1:

Private Sub Command1_Click()Dim i%, k%k = 0For i = 100 To 200If i Mod 3 <> 0 Then Print i;: k = k + 1If k Mod 6 = 0 Then PrintNextEnd Sub

回答2:

Private Sub Form_Click()
Dim a
a = 99
Do While a < 201
a = a + 1
If a Mod 3 > 0 Then Print a
Loop
End Sub