Need a project done?

C++ Programming Developer

Search This Blog

Recursion Question

What will be the output?
#include <iostream>
using namespace std;
void f(int);
int main()
{
 f(2);
 return 0;
}
void f(int n)
{
 if (n == 0)
  cout << n << ' ';
 else
  f(n-1);
}
Reply in comments.

2 comments:

"Don't let anyone ever make you feel like you don't deserve what you want."