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?

Again use CODE TAGS...arghhh

>>What is the output?

The output is either compile time errors, or a stack overflow in your "recurse" function.

Again use CODE TAGS...arghhh

>>What is the output?

The output is either compile time errors, or a stack overflow in your "recurse" function.

What is wrong or missing?

What is the output?

What stops you from building and running this?

or a stack overflow in your "recurse" function.

What makes you think so?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.