网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

阅读下列程序: Private Sub Form Click() Dim i As Integer, sum As Integer For i = 2 To 10 If i Mod 2 <> 0 Then Print i; Else sum = sum + i End If Next i Print sum End Sub 程序运行后,单击窗体,在窗体上的输出结果是

A.3 5 7 9 30

B.1 3 5 7 9

C.2 4 6 8 20

D.11 15 17 19 20


参考答案

更多 “ 阅读下列程序: Private Sub Form Click() Dim i As Integer, sum As Integer For i = 2 To 10 If i Mod 2 <> 0 Then Print i; Else sum = sum + i End If Next i Print sum End Sub 程序运行后,单击窗体,在窗体上的输出结果是A.3 5 7 9 30B.1 3 5 7 9C.2 4 6 8 20D.11 15 17 19 20 ” 相关考题
考题 有如下程序: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() 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 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