Towers of Hanoi: Difference between revisions

Content added Content deleted
m (added whitespace before the TOC (table of contents), added a ;Task: (bold) header, added other whitespace to the task's preamble.)
Line 2,125:
Move disk 2 from 1 to 2
Move disk 1 from 3 to 2</pre>
 
=={{header|Objeck}}==
<lang objeck>
class Hanoi {
function : Main(args : String[]) ~ Nil {
Move(4, 1,2,3);
}
 
function: Move(n:Int, f:Int, t:Int, v:Int) ~ Nil {
if(n = 1) {
"Move disk from pole {$f} to pole {$t}"->PrintLine();
}
else {
Move(n - 1, f, v, t);
Move(1, f, t, v);
Move(n - 1, v, t, f);
};
}
}</lang>
 
=={{header|Objective-C}}==