# 请问VB中的递回...Thx

Posted by Canoe on July 14, 1999 at 03:24:04:

Private Sub cmdstart_Click()
Dim Hei As Integer
Cls
Hei = InputBox("有多少盘?")
MoveHanoi Hei, 1, 3, 2
End Sub
----------------------------------------------------------------------
Private Sub MoveHanoi(High As Integer, from As Integer, target As Integer, aux As Integer)
If High > 0 Then
MoveHanoi High - 1, from, aux, target
Print from; "--->"; target
MoveHanoi High - 1, aux, target, from
End If
End Sub
输入：3
得：1->3
1->2
3->2
1->3
2->1
2->3
1->3
请问各大高手，电脑如何计算出来答案呢？（计算程序？）
搞得一头雾水的VB新鲜人留

Follow Ups: