Private Sub Book(x As Integer)x=x * 2 + 1If x < 6 ThenCall Book(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command2_Click()Book 2End SubA) 23 47 B) 10 36C) 22 44 D) 24 5030) 单击命令按钮时,下列程序的执行结果为Private Sub Command1_
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 05:24:54
Private Sub Book(x As Integer)x=x * 2 + 1If x < 6 ThenCall Book(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command2_Click()Book 2End SubA) 23 47 B) 10 36C) 22 44 D) 24 5030) 单击命令按钮时,下列程序的执行结果为Private Sub Command1_
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
30) 单击命令按钮时,下列程序的执行结果为
Private Sub Command1_Click()
Dim a As Integer,b As Integer,c As Integer
a=2:b=3:c=4
Print P2(c,b,A)
End Sub
Private Function P1(x As Integer,y As Integer,z As Integer)
P1=2 * x + y + 3 * z
End Function
Private Function P2(x As Integer,y As Integer,z As Integer)
P2=P1(z,x,y) + x
End Function
A) 21
B) 19
C) 17
D) 34
Private Sub Command1_Click()
Dim k As Integer,m As Integer
Dim p As Integer
k=4:m=1
p=PC(k,m) :Print p;
p=PC(k,m) :Print p
End Sub
Private Function PC(a As Integer,b As Integer)
Static m As Integer,i As Integer
m=0:i=2
i=i + m + 1
m=i + a + b
PC=m
End Function
程序运行后,输出的结果为
A) 4 6
B) 6 6
C) 8 8
D) 10 12
Private Sub Book(x As Integer)x=x * 2 + 1If x < 6 ThenCall Book(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command2_Click()Book 2End SubA) 23 47 B) 10 36C) 22 44 D) 24 5030) 单击命令按钮时,下列程序的执行结果为Private Sub Command1_
A
A
C