Turnrile din Hanoi
#include<iostream>
using namespace std;
int p=0;
int hanoi(int n, int i, int j)
{ p++;
if(n==1) cout<<i<<"->"<<j<<endl;
else {hanoi(n-1,i,6-i-j);
cout<<i<<"->"<<j<<endl;
hanoi(n-1,6-i-j,j);}
return p;
}
int main()
{int n;
cin>>n;
hanoi(n,1,2);
cout<<p<<" mutari";}