DECLARE SUB hanoi (m!, a$, b$, c$, counter!) CLS counter = 0 INPUT "Number of plates:", n PRINT CALL hanoi(n, "A", "B", "C", counter) PRINT "Total number of moves"; counter SUB hanoi (m, a$, b$, c$, counter) IF m > 0 THEN CALL hanoi(m - 1, a$, c$, b$, counter) PRINT "Move"; m; "from "; a$; " to "; c$ counter = counter + 1 CALL hanoi(m - 1, b$, a$, c$, counter) END IF END SUB