I'm a starter in C++.
Can someone explain the output of this program ?
# include <iostream>
using namespace std ;
void number ( int a)
{
if( a < 0 )
return ;
else
{
cout<< a <<" ";
number(a - 1);
cout<< a << " ";
}
}
int main ()
{
number(7);
return 0;
}
Output : 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7