有如下程序:
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
程序运行后,单击窗体,输出结果为( )。
A.12
B.30
C.24
D.18
第1题:
有如下程序:
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
Print Sum
End Sub
程序运行后,单击窗体,输出结果为
A.12
B.30
C.24
D.18
第2题:
有如下程序: 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 程序运行后,单击窗体,输出结果为
A.12
B.30
C.24
D.18
第3题:
有如下程序: 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 Print Sum End Sub 程序运行后,单击窗体,输出结果为
A.12
B.30
C.24
D.18
第4题:
有如下程序: 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 程序运行后,单击窗体,输出结果为______。
A.12
B.30
C.24
D.18
第5题:
有如下程序: 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 Print Sum End Sub 程序运行后,单击窗体,输出结果为
A.12
B.30
C.24
D.18
第6题:
A. 12
B. 18
C. 24
D. 30
第7题:
有如下程序: Private Sub Form_Click() Dimi As Integer,sumASInteger sum=0 For i=2To 10 If i Mod2<>0 And i Mod 3=0 Then sum=sum+i End If Nexti Print sum EndSub 程序运行后,单击窗体,输出结果为( )。
A.12
B.30
C.24
D.18
第8题:
设有如下程序:
Private Sub Form_Click()
Dim i As Integer,x As String,Y As String
x=”ABCDEFG”
For i=4 To 1 Step-1
y=Mid(x,i,i)+y
Next i
Print y
End Sub
程序运行后,单击窗体,输出结果为
A.ABCCDEDEFG
B.AABBCDEFG
C.ABCDEFG
D.AABBCCDDEEFFGG
第9题:
有如下程序:
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
EndIf
Next
Print Sum
End Sub
程序运行后,单击窗体,输出结果为
A.12
B.30
C.24
D.18