更多"下列事件过程运行后输出结果是( )。 Private Sub Co"的相关试题:
[单项选择]下面程序运行后,单击命令按钮,输出的结果是
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 (
[单项选择]以下程序运行后,单击按钮输出结果是 Private Sub Commandl_Click( ) Dim x As Integer,y As Integer,z As Integer X=4:y=2: Z=3 Call Gopd(x,x,z) Print x;X;Z Call Gopd(x,y,y) Print x;y;y End Sub Private Sub Gopd(x As Integer,y As Integer,z As Integer) X=3 * Z + 1 y=2 * z z=x + y End Sub
A. 6 6 12 7 11 11
B. 8 5 10 5 11 11
C. 9 6 12 9 10 15
D. 8 10 10 5 9 10
[填空题]下面程序运行后,单击命令按钮,输出的结果是【 】。
Private Sub Commandl_Click( )
Dim a%(1 To 4) ,b%(2 To 6) ,i%,strl#,str2#
For i=1 To 4
a(i) =i
Next i
For i=2 To 6
b(i) =i
Next i
str1 =YAG(a)
str2 =YAG(b)
Print"strl";str1;"str2=";str2
End Sub
Function YAG (a( )As Integer)
Dim T#,i%
t=1
For i=LBound(a) To UBound(a)
t=t * a(i)
Next i
YAG =t
End Function
[填空题]下面程序运行后,单击命令按钮,输出的结果是 【8】
Private Sub Commandl_Click( )
Dim a%(1 To 4) ,b%(2 To 6) ,i%,strl#,str2#
For i=1 To 4
a(i) =i
Next i
For i=2 To 6
b(i) =i
Next i
str1 =YAG(a)
str2 =YAG(b)
Print"strl";str1;"str2=";str2
End Sub
Function YAG (a( )As Integer)
Dim T#,i%
t=1
For i=LBound(a) To UBound(a)
t=t * a(i)
Next i
YAG =t
End Function
[单项选择]下列代码运行后输出结果是( )。
Defstr B-E
Private Sub Cornmand1_Click( )
B$=“123”
C=“456”
Print B+C$
End Sub
A. 123456
B. “123456”
C. 123+“456”
D. 显示出错信息
[单项选择]单击按钮时,以下程序运行后的输出结果是 Private Sub Commandl_Click( ) Dim X As Integer,y As Integer,z As Integer x=1:y=2: Z=3 Call God(x,x,z) Print x;x;z Call God(x,y,y) Print X;y;y End Sub Private Sub God(x As Integer,y As Integer,z As Integer) x=3 * Z + 1 y=2 * Z z=x + y End Sub
A. 6 6 12 7 11 11
B. 8 5 10 5 11 11
C. 9 6 12 9 10 15
D. 8 10 10 5 9 10
[填空题]某个窗体己编写以下事件过程。打开窗体运行后,单击窗体,消息框的输出结果为
Private Sub Form_Click( )
a=1
i=1
Do Until i>10
a=a+2
i=i+3
Loop
MsgBox a
End Sub
[单项选择]下面程序运行后,单击命令按钮,输出的结果是( )。
Private Sub Command1_Click( )
Dim a%(1 To 4),b%(2 To 6),i%,str1#, str2#
For i=1 To 4
a(i)=1
Next
For i=2 To 6
b(i)=i
Next
str1=YAG(A)
str2=YAG(B)
Print "str1="; str1; "str2=": str2
End Sub
Function YAG(a( ) As Integer)
Dim t#,i%
t=1
For i=LBound(A) To UBound(A)
t=t*a(i)
Next
YAG=t
End Function
A. str1=24 str2=720
B. str1=12 str2=360
C. str1=24
D. str1=36 str2=720
[单项选择]有下列程序,程序运行后单击命令按钮,则输出的结果是( )。
Private Sub Command1_Click( )
Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2#
For i=1 To 4
a(i)=i
Next i
For i=3 To 6
b(i)=i
Next i
s1=Factorial(
A.
B.
[单项选择]以下程序运行后,单击按钮输出结果是( )。
Private Sub Commandl_Click( )
Dim x As Integer,y As Integer,z As Integer
X=4:y=2: Z=3
Call Gopd(x,x,z)
Print x;X;Z
Call Gopd(x,y,y)
Print x;y;y
End Sub
Private Sub Gopd(x As Integer,y As Integer,z As Integer)
X=3 * Z + 1
y=2 * z
z=x + y
End Sub
[单项选择]单击按钮时,以下列程序运行后的输出结果是
Private Sub proc1(x As Integer,y As Integer,z As Integer)
x=3*z
y=2*z
z=X+y
End Sub
Private Sub Command1_Click( )
Dim x As Integer,y As Integer,z As Integer
x=1:y=2:z=3
Call proc1(x,x,2)
Print x;x;z
Call proc1(x,y,y)
Print x;y;y
End Sub
A. 6 6 12
B. 9 5 10
C. 9 6 12
D. 9 5 10
[填空题]下面程序运行后,单击命令按钮,输出的结果是______。
Private Sub Command1_Click( )
Dim a%(1 To 5),i%,s#
For i=1 To 5
a(i)=i
Next
s=Fun(A)
Print "s=";s;
End Sub
Function Fun(a( )As Integer)
Dim t#.i%
t=1
For i=LBound(A) To UBound(A)
t=t*a(i)
Next
Fun=t
End Function