program hanoi_tornyai; procedure hanoi(n:integer;forras,cel,seged:string[5]); begin if n > 0 then begin hanoi(n-1,forras,seged,cel); writeln(n,' ',forras:5,' -> ',cel:5); hanoi(n-1,seged,cel,forras); end; end; begin hanoi(3,'Rez','Arany','Ezust'); readln; end.