网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有如下程序:
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
参考答案
更多 “ 有如下程序:Private Sub Form_Click()Dim i As Integer, sum As Integersum = 0For i = 2 To 10If i Mod 2 0 And i Mod 3 = 0 Thensum = sum + iEnd IfNext iPrint sumEnd Sub程序运行后,单击窗体,输出结果为( )。A.12B.30C.24D.18 ” 相关考题
考题
有如下程序:Private Sub Form_Click()Dim i As Integer,Sum As IntegerSum=0For i=2 To 10If i Mod 2<>0 And i Mod 3=0 ThenSum=Sum+iEndIfNextPrint SumEnd Sub程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
考题
设有如下程序:Private Sub Form_Click()Dim i As Integer,x As String,Y As Stringx=”ABCDEFG”For i=4 To 1 Step-1y=Mid(x,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG
考题
有如下程序: 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.12B.30C.24D.18
考题
下列程序运行后,单击窗体,输出结果为( )。 Private Sub Form_Click() Dim i As Integer, sum As Integer sum = 0 For i = 2 To 10 If i Mod 2 <> 0 Andi Mod 3 = 0 Then sum = sum + i End If Next i Print sum End Sub
A. 12B. 18C. 24D. 30
考题
有如下程序: 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.12B.30C.24D.18
考题
有如下程序: 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.12B.30C.24D.18
考题
有如下程序: 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.12B.30C.24D.18
考题
有如下程序: 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.12B.30C.24D.18
考题
有如下程序:Private Sub Form_Click()Dim i As Integer, Sum As IntegerSum=0For i=2 To 10If i Mod 2=0 And i Mod 30 ThenSum=Sum+iEnd IfNextPrint SumEnd Sub程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
热门标签
最新试卷