Hello this isn't an assignment or anything but can you explain why this returns 2 1.
#include <string>
using namespace std;
void fun(int);
int main()
{
int a = 0;
fun(a);
return 0;
}
void fun(int n)
{
if (n < 2)
{
fun(++n);
cout << n<<" ";
}
}