289
>
{turnurile din Hanoi} program hanoitowers; var a,b,c:char; n:integer; procedure han(n:integer; a,b,c:char); begin if n=1 then writeln(a,b) else begin han(n-1,a,b,c); writeln(a,b); han(n-1,c,b,a); end; end; begin write('n= '); readln(n); a:='a'; b:='b'; c:='c'; han(n,a,b,c); readln; end. {Pascalzone.uv.ro}