更多"单击命令按钮,下列程序的执行结果是 Private Sub Blck"的相关试题:
[单项选择]单击命令按钮,下列程序的执行结果是 Private Sub Blck (x As Integer) x = x * 2 + l If x <6 Then Call Blck(x) End If x = x * 2 + 1 Print x; End Sub Private Sub Commandl_Click( ) Blck 2 End Sub
A. 23 47
B. 10 36
C. 22 44
D. 24 50
[单项选择]单击命令按钮时,下列程序的执行结果是 Private Sub Book(x As Integer) x=x * 2 + l If x<6 Then Call Book(x) End If X=X * 2 + 1 Print x; End Sub Private Sub Command2_Click( ) Book2 End Sub
A. 23 47
B. 10 36
C. 22 44
D. 24 50
[单项选择]单击命令按钮时,下列程序的执行结果是 Private Sub Book( x As Integer) x=x*2+1 If x<6 Then Call Book(x) End If x=x * 2 + 1 Print x; End Sub Private Sub Command2_Click( ) Book 2 End Sub
A. 23 47
B. 10 36
C. 22 44
D. 24 50
[单项选择]单击命令按钮时,下列程序的执行结果是
Private Sub Command1_Click( )
BT 4
End Sub
Private Sub BT(x As Integer)
x=x*2+1
If x<6 Then
Call BT(x)
End If
x=x*2
Print x;
End Sub
A) 15 B) 16
C) 17 D) 18
[单项选择]窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是
Private Sub Command1_Click( )
Dim a
a = Array(1,2,3,4,5)
For k = 1 To4
s=s+a(k)
Next
Print S
End Sub
A. 10
B. 14
C. 15
D. 120
[单项选择]下面程序运行后,单击命令按钮,输出的结果是 Pivate Sub Cornmand1_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 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 str2=180
D. str1=36 str2=720
[单项选择]单击命令按钮时,下列程序的执行结果是Private Sub Command1_Click( ) Dim a As Integer,b As Integer,c As Integer a=3 b=4 c=5 Print SecProc(c,b,a)End SubFunction FirProC(x As Integer,y As Integer,z As Integer) FirProc=2*s+y+3*zEnd FunctionFunction SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+xEnd Function
A. 20
B. 22
C. 28
D. 30
[单项选择]窗体上有一个命令按钮,命令按钮的单击事件过程如下。运行程序后,单击命令按钮,输出结果是( )。
Private Sub Command1_Click( )
Dim a
a=Array(1,2,3,4,5)
For k=1 To 4
S=s+a(k)
Next k
Print s
End Sub
A. 10
B. 14
C. 15
D. 120
[填空题]下面运行程序后,单击命令按钮,输出的结果是【 】。
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=YAS(A)
s2=YAS(B)
Print"s1=";s1;"s2=";s2
End Sub
Function YAS(a( )As Integer)
Dim t#,i%
t=1
For i=LBound(A) To UBound(A)
t=t * a(i)
Next i
YAS=t
End Function
[单项选择]单击命令按钮时,下列程序的执行结果是( )。
Private Sub Command1_Click( )
Dim a As Integer,b As Integer,C As Integer
a=3
b=4
c=5
Print SecProc(c,b,a)
End Sub
Function FirProc (x As Integer,y As Integer,z As Integer)
FirProc=2 * x + y + 3 * z+2
End Function
Function SecProc (x As Integer,y As hteger,z As Integer)
SecProc=FirProc(z,x,y)+x+7
End Function
A. 20
B. 25
C. 37
D. 32