有如下程序:
Private Sub Form_Click()
Dim i As Integer, sum As Integer
Sum = 0
For i = 2 To 10
If i Mod 2 <> 0 And i Mod 3 = 0 Then
Sum = sum + i
End If
Next i
Print sum
End Sub
程序运行后,单击窗体,输出结果为
12
有如下程序:
Private Sub Form_Click()
Dim i As Integer, sum As Integer
Sum = 0
For i = 2 To 10
If i Mod 2 <> 0 And i Mod 3 = 0 Then
Sum = sum + i
End If
Next i
Print sum
End Sub
程序运行后,单击窗体,输出结果为
12