Private Sub Command1_Click()
D.im a(10)As Integer
D.im x As Integer
F.or i=1 To 10
a(i)=i
Next i
x=1
MsgBoxa(f(x)+x)
E.nd Sub
F.unction f(y As Integer)
y=y+2
f=y
E.nd Function
程序运行后,单击命令按钮,消息框的输出结果为______。
[单选题]在窗体上画一个命令按钮(其名称为Command1),然后编写如下代码:Private Sub Command 1_Click()D.im aa=Array(1,2,3,4)i=3:i=1D.o While i>=0s=s+a(i)*ji=i-1j=j*10LoopPrint sE.nd Sub运行上面的程序,单击命令按钮,则输出结果是( )。A.4321B.123C.234D.1234
[单选题]在窗体上画1个命令按钮,其名称为Command1,然后编写如下程序:Private Sub Command1_Click()D.im a(10)As IntegerD.im x As IntegerF.or i=1 To 10a(i)=8+iNextx=2Print a(f(x)+x)E.nd SubF.unction f(x As Integer)x=x+3f=xE.nd Function程序运行后,单击命令按钮,输出结果为( )。A.12B.15C.17D.18
[单选题]在窗体上画1个命令按钮,其名称为Command1,然后编写如下程序: Private Sub Command1 Click() Dim a(10) As Integer Dim x As Integer For i=1 To 10 a(i)=8+i Next x=2 Print a(f(x)+x) End Sub Function f(x As Integer) x=x+3 f=x End Function 程序运行后,单击命令按钮,输出结果为______。A.12B.15C.17D.18
[单选题]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(By Val x As Integer, Y As Integer) y=x*y If y>0 Then Func=x Else Func=y End If End Function Private Sub Command1_Click() Dim a As Integer, b As Integer a=3 b=4 c=Func(a,b)Print" a="; a Print" b=";
[单选题]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(ByVal x As Integer,y As Integer) y=x*y If y>0 Then Func=x Else Func=y End If End Function Private Sub Command1_Click() Dim a As Integer,b As Integer a=3 b=4 c=Func(a,B)Print "a=";a Print=b=";b Print
[单选题]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(ByVal x As Integer, y As Integer) y=x*y If y > 0 Then Func = x Else Func = y End If End Function Private Sub Command1_Click( ) Dim a As Integer, b As Integer a=3 b=4 c=Func(a,B)Print "a=";a Print "b
[单选题]在窗体上画一个名称为Command1命令按钮,然后编写如下事件过程:Private Sub Command1_Click()c = “ABCD”F.or n= 1 To 4Print ( )NextE.nd Sub程序运行后,单击命令按钮,要求在窗体上显示如下内容( )。DCDBCDABCD则在( )处填入的内容为。A.Left(c,n)B.Right(c,n)C.Mid(c,n,1)D.Mid(c,n,n)
[单选题]在窗体上画一个命令按钮,名称为Command1,然后编写如下事件过程: Private Sub Command1_Click() a$="software and hardware" b$=Right(a$,8) c$=Mid(a$,1,8) MsgBox a$,,b$,c%,1 End Sub 运行程序,单击命令按钮,则在弹出的信息框的标题栏中显示的是______。A.software and hardwareB.softwareC.hardwareD.1
[单选题]在窗体上画一个命令按钮,名称为Command1,然后编写如下事件过程: Private Sub Command1_Click() Dim a() a=Array("机床","车床","钻床","轴承")Print a(2) End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.机床B.车床C.钻床D.轴承
[单选题]在窗体上画一个命令按钮,名称为Command1,然后编写如下事件过程: Private Sub Commandl_Click() Dim a() a=Array(“机床”,“车床”,“钻床”,“轴承”) Print a(2) End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.机床B.车床C.钻床D.轴承