Towers of Hanoi: Difference between revisions

Content added Content deleted
m (→‎{{header|Dc}}: fix <lang> tag)
(Spelling correction in mathematica example)
Line 592: Line 592:
Hanoi[n_Integer, from_, to_, via_] :=
Hanoi[n_Integer, from_, to_, via_] :=
(Hanoi[n-1, from, via, to];
(Hanoi[n-1, from, via, to];
Print["Move dist from pole ", from, " to ", to, "."];
Print["Move disk from pole ", from, " to ", to, "."];
Hanoi[n-1, via, from, to])</lang>
Hanoi[n-1, via, from, to])</lang>