未分类题

单击命令按钮时,下列程序的执行结果是
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
D.18

A.15
B.16
C.17

【参考答案】

D
解析:此题在函数调用过程中采用了简单递归的方式,具体流程如下:主调过程调用BT过程,把实参4传递给BT过程中......

(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)