What is the output?Code:int main() { recurse(5,3); return 0; } // end main void recurse(int x, int y) { if (y > 0) { ++x; --y; cout << x << " " << y << endl; recurse(x, y); cout << x << " " << y << endl; } // end if } // end recurse
What is the output?Code:int main() { recurse(5,3); return 0; } // end main void recurse(int x, int y) { if (y > 0) { ++x; --y; cout << x << " " << y << endl; recurse(x, y); cout << x << " " << y << endl; } // end if } // end recurse
Did you not run it?
Mainframe assembler programmer by trade. C coder when I can.
We give up. But if you don't know, and want to, then download and install GCC, the GNU Compiler Collection - GNU Project - Free Software Foundation (FSF) and Code::Blocks, then build, link, and run the program, and you have your answer.
6 2
7 1
7 1
6 2
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
Again? Is he trying to pass a class w/o running a compiler? Neat trick if you can do it...