We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9af6c2 commit 6e0baeaCopy full SHA for 6e0baea
puzzles/Tower_Of_Hanoi/VBScript/Hanoi.vbs
@@ -0,0 +1,8 @@
1
+Sub Hanoi(n, source, destination, helper)
2
+ If n < 1 Then Exit Sub
3
+ Hanoi n - 1, source, helper, destination
4
+ WScript.Echo "Move disk #" & n & " from " & source & " rod to " & destination & " rod."
5
+ Hanoi n - 1, helper, destination, source
6
+End Sub
7
+
8
+Hanoi 4, "left", "middle", "right"
0 commit comments