== C++ version == * 개발자 : 나휘동 * Recusive Function Call 사용 {{{~cpp #include void hanoi(const int n, int x, int y, int z); int count = 0; void main() { hanoi(4, 1, 2, 3); cout << "Steps : " << count << endl; } void hanoi(const int n, int x, int y, int z) { if ( n == 1){ cout << x << "->" << y << endl; count++; } else{ hanoi(n-1, x, y, z); hanoi(1, x, z, y); hanoi(n-1, y, z, x); } } }}} ---- [몸짱프로젝트]