A.6
B.8
C.9
D.12
[单选题]在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Option Base 1 Private Sub fun (a()As Integer,n As Integer) For i=1 To 2 t=a(i):a(i)=a(5-i+1):a(5-i+1)=t Next i End Sub Private Sub Command1_Click() Dim arr1(5)As Integer For i=1 To 5 arr1(i)=i Next i Call fun(arr1
[单选题]在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Private Sub fun() Static a As Integer a=a+2 Print a; End Sub Private Sub Command1_Click() Dim m As Integer For m=1 To 3 Call fun Next m End SubA.2 2 2B.0 0 0C.2 4 8D.2 4 6
[单选题]在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Private Sub func(a As Integer) Static m As Integer m=m+a Print m; End Sub, Private Sub Command1_Click() Dim k As Integer k=4 Call func(k) Call func(k) End SubA.4 8B.4 4C.8 8D.8 4
[单选题]在窗体上画一个命令按钮(名称为 Commandl),然后编写如下事件过程: Private Sub Commandl_Click() Static a As Integer a=a+1 End Sub 运行程序,第3次单击命令按钮后,变量a的值为( )A.0B.1C.2D.3
[单选题]在窗体上画一个命令按钮,然后编写如下程序。运行后,单击命令按钮,输出结果为 ( )。Private Sub Command4_Click()D.ima As Integer,bASIntegera=1b=2PrintN(a,b)E.nd SubF.unction N(X As Integer,yAsInteger)AsIntegerN=IIf(x>y,x,y)E.nd FuncfionA.B.C.D.
[单选题]在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()D.im m As Integer, n As Integer, p As Integerm=3: n=5: p=0C.all Y(m, n, p)Print Str(p)E.nd SubSub Y(ByVal i As Integer, ByVal j As Integer, k As Integer)k=i + jE.nd Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A
[单选题]在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()D.im a(5) As StringF.or i = 1 To 5a(i) = Chr(Asc("A") + (i - 1))Next iF.or Each b In aPrint b;NextE.nd Sub程序运行后,单击命令按钮,输出结果是( )。A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息
[单选题]在窗体上画一个命令按钮,然后编写如下事件过程:PrivateSubcommand1_click()D.imaAsString,bAsStringa=InputBox("EntertheFirstinteger")b=InputBox("EntertheSecondinteger")Printb+aE.ndSub程序运行后,单击命令按钮,先后在两个输入对话框中分别输入456和111,则输出结果是( )A.456B.111C.567D.111456
[单选题]在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Dim a() a=Array(1,3,5,7) s=0 For i=1 To 3 S=S*10+a(i) Next i Print s End Sub 程序运行后,输出结果为( )。A.135B.357C.531D.753
[单选题]在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()s=1D.os=(s + 1) * (s + 2)Number=Number + 1Loop Until s >=30Print Number, sE.nd Sub程序运行后,输出的结果是( )。A.2 3B.2 56C.5 12D.10 20