题型:单选题 题类:常考题 难易度:普通
浙江省高中信息技术 递归算法练习
Private Sub Command1_Click()
Dim n As Integer, m As Integer
n=2:m=0
Do While m < 3
n=n+2
If fun(n) Then
Print n
m=m+1
End If
Loop
End Sub
Function fun(x As Integer) As Boolean
fun=false
If x/2=Int(x/2) Then
fun=fun(x/2)
Else
If x=1 Then fun=True
End If
End Function
试题篮