using namespace std;
void hanoi(int n, char source, char via, char dist)
{
if(n==1)
cout<<"Move sheet from pillar"< else
{
hanoi(n-1, source, dist, via);
hanoi(1, source, via, dist);
hanoi(n-1, via, source, dist);
}
}
int main()
{
int n;
cout<<"請輸入盤數:";
cin>>n;
cout<
return 0;
}
沒有留言:
張貼留言