A.2 2 2
B.0 0 0
C.2 4 8
D.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
[单选题]在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 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 Function fun3(x As Integer) Static t As Integer t = t + 3 t = t + x fun3 = t End Function Private Sub Commandl Click() Dim a As Integer, b As Integer, c As Integer a = 2 : b = 1 c = fun3 (A)c = fun3 (B)Pr
[单选题]在窗体上画一个命令按钮,名称为Commandl,然后编写如下事件过程: Private Sub Commandl_Click() a$="software and hardware" b$=Right(a$,8) c$=Mid(a$,1,8) MsgBoxa$,,b$,c$,1 End Sub 运行程序,单击命令按钮,则在弹出的信息框的标题栏中显示的是______。A. software and hardwareB.softwareC.hardwareD.1
[单选题]在窗体上画一个命令按钮,名称为Commandl,然后编写如下事件过程: Private Sub Commandl_Click() Dim a() a=Array(“机床”,”车床”,”钻床”,”轴承”) Print a(2) End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.机床B.车床C.钻床D.轴承
[单选题]在窗体上画一个命令按钮,然后编写如下程序。运行后,单击命令按钮,输出结果为 ( )。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.
[单选题]在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() x=Input Box("Input") Select Case x Case 1,3 Print"分支1" Case Is>4 Print"分支2" Case Else Print"Else分支" End Select End Sub 程序运行后,如果在输入对话A.分支1B.分支2C.Else分支D.程序出错
[单选题]在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: PrivateSubCommandl_CnCk() aS="VisualBasic", Print String(3,a$) End Sub 程序运行后,单击命令按钮,在窗体上显示的内容是( )。A.VVVB.VisC.sicD.11
[单选题]在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim n As Integer For n = 0 To 9 Step 3 Print rel(n); Next n End Sub Private Function rel(ByVal i As Integer)As Integer Dim x As Integer x = 0 For j = 1 To i If i < 5 Then rel = i: EXit
[单选题]在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() x = 0 n=InputBox(" ") For i = 1 To n For j=1 To i x = x + 1 Next i Next i Print x End Sub 程序运行后,单击命令按钮,如果输入3,则在窗体上显示的内容是A.3B.4C.5D.6