4、=3Ifi>10True,结束PrivateSubCommand1_Click()DimiAsInteger,nAsIntegerFori=0To50i=i+3n=n+1ifi>10ThenExitForNextText1.Text=Str(n)EndSub程序运行后,单击命令按钮,在文本框中显示的值是A)2B)3C)4D)5(20)阅读程序:4Private Sub Command1_Click() a=0 For j=1 To 15 a=a+j Mod 3 Next j Print aEnd Sub程序运行后,单击窗体,输出结果是A)105B)1C)1
5、20D)15 (23)在窗体上画一个命令按钮,其名称为Command1,然后编写如下代码:Option Base 13Private Sub Command1_Click() Dim a a = Array(1, 2, 3, 4) j = 1 For i = 4 To 1 Step -1 s = s + a(i) * j j = j * 10 Next i Print sEnd Sub程序运行后,单击命令按钮,其输出结果是A)4321B)1234C)34D)12(25)在窗体上画一个命令按钮,名称为Command1,然后编写如下代码:
6、Option Base 03Private Sub Command1_Click() Dim A1(4) As Integer, A2(4) As Integer For k = 0 To 2 A1(k + 1) = InputBox("请输入一个整数") A2(3 - k) = A1(k + 1) Next k Print A2(k)End Sub程序运行后,单击命令按钮,在输入对话框中依次输入2、4、6则输出结果为A)0B)1C)2D)321、窗体上有command1command2两个命令按钮。先编写以下程序:Optionbase0D