题目内容:
下面程序运行时,单击窗体后,窗体上显示的结果是( )。
Private Sub Form_Click()
Dim I As Integer
Dim sum As Long
sum=0
For I=10 To 16
If I Mod 3=0 OrI Mod 5=0 Then
sum=sum+I
End If
Next I
Print sum
End Sub
A.10
B.12
C.37
D.22
参考答案:
下面程序运行时,单击窗体后,窗体上显示的结果是( )。
Private Sub Form_Click()
Dim I As Integer
Dim sum As Long
sum=0
For I=10 To 16
If I Mod 3=0 OrI Mod 5=0 Then
sum=sum+I
End If
Next I
Print sum
End Sub
A.10
B.12
C.37
D.22