E.nd Sub
A.19
B.21
C.22
D.23
[单选题]下列程序运行后,单击命令按钮,窗体显示的结果为( )。 Private Function pl(x As Integer,y As Integer,z As Integer) pl=2*x+y+3*z End Function Private Function p2(X As Integer,y As Integer,z As Integer) p2=p1(z,y,x)+x End Function Private Sub Commandl_Click()A.23B.19C.21D.22
[单选题]执行下面这段程序后,单击命令按钮,窗体中输出结果是 ______。 Private Sub Command1_Click() a=1 : b=4 : c = 9 : d = 5 If a < b Then If c<d Then x=True Else If a<c Then x=False Else x=True End If End If End If Print Val(x) End SubA.TrueB.FalseC.0D.1
[单选题]执行下面的程序,单击命令按钮后,窗体中的输出结果是 ______。 Private Sub Cotomand1_Click() Ch$="Welcome Home!" a=Len(ch$) For i= 1 To a b$ = Mid(ch$, i 1) If b$ = "m" Then m = m + 1 Next 1 Print m End SubA.2B.3C.1D.0
[主观题]下面运行程序后,单击命令按钮,输出的结果是______。Private Sub Commandl_clck()D.im a%(1 To 4),b%(3 To 6),i%,s1,s2F.ori=1 To 4a(i)=iNextiF.or i=3 To 6b(i)=iNextis1=YAS(a)S2=YAS(b)Printt"s1=";S1"S2=";s2E.nd Sub
[单选题]下面程序运行后,单击命令按钮,输出的结果是Private Sub Command1_Click()D.im a%(1 To 4) , b%(2 To 6) , i%, str1#, str2#F.or i=1 To 4a(i)=iNextF.or i=2 To 6b(i)=iNextstr1=YAG(a)str2=YAG(b)Print "str1="; str1; "str2="; str2E.nd SubF.unction YAG(a() As Integer)D.im t#, i%
[单选题]下面程序运行后,单击命令按钮,输出的结果是 Private Sub Command1_Click( ) Dim a%(1 To 4) , b%(2 To 6) , i%, str1#, str2# For i = 1 To 4 a(i) =i Next For i = 2 To 6 b(i) =i Next str 1 = YAG (A)str 2 = YAG (B)Print "str1 ="; str1; "str2 ="; str2 End Sub Function YAG(a()
[单选题]有下列程序,程序运行后单击命令按钮,则输出的结果是( )。Private Sub Command1_Click()D.im a%(1 To 4),b%(3 To 6),i%,s1#,s2#F.or i=1 To 4a(i)=iNext iF.or i=3 To 6b(i)=iNext is1=Factorial(A)s2=Factorial(B)Print"s1=";s1;"s2=";s2E.nd SubF.unction Factorial(a() As Integer)D.im t#
[试题]下面运行程序后,单击命令按钮,输出的结果是 [ ] 。Private Sub Command1_Click()D.im a%(1 To 5),i%, s#F.or i=1 To 5a(i)=iNexts=Fun(a)Print "s="; s;E.nd SubF.unction Fun(a() As Integer)D.im t#, i%t=1F.or i=LBound(a) To UBound(a)t=t a(i)NextF.un=tE.nd Function
[单选题]下面程序运行时,单击窗体后,窗体上显示的结果是( )。 Private Sub Form_Click() Dim I As Integer Dim sum As Long sum=0 For I=10 To 16 If I Mod 3=0 OrI Mod 5=0 Then sum=sum+I End If Next I Print sum End SubA.10B.12C.37D.22
[单选题]下面程序运行时,单击窗体后,窗体上显示的结果是( )。 Private Sub Form_Click Dim I As Integer Dim sum As Long Dim t1 As Long t1=1:sum=0 For 1=1 To 3 t1=t1*I sum=sum+t1 Next I Print sum End SubA.3B.9C.5D.6