#include #include void move(int,int,int,int); int main(int argc, char *argv[]) { move(4, 1, 2, 3); system("PAUSE"); return EXIT_SUCCESS; } void move(int discs, int start, int spare, int end) { if(discs<2) { cout << "Move disc " << discs << " to pole " << end << "\n"; } else { move(discs -1, start, spare, end); cout << "Move disc " << discs << " to pole " << end << "\n"; move(discs -1, start, spare, end); } }