1234567891011121314151617
int main(void) { int x=3; hanoi(x); } void hanoi(int x) { if(x==1) { cout<<x<<" "; } else { hanoi(x-1); cout<<x<<" "; hanoi(x-1); } }