作业帮 > 综合 > 作业

Private Sub Book(x As Integer)

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/17 13:01:23
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)
A
A
C