2.2 漢諾塔問題

#include<iostream> using namespace std; int t = 0; void mov(int n,char a,char b,char c) { if(n==1) { cout << ++t << ":" << a <<"->" << c << endl; return ; } mov(n-1,a,c,b); cout << ++t << ":"
相關文章
相關標籤/搜索