Problem:
It should print its local variable and recursive call parameter. For each recursive call, display the outputs on a separate line and add a level of indentation. Do your utmost to make the outputs clear, interesting and meaningful.
I havent done yet the "separate line and add a level of indentation".
Error:Code:#include <iostream>
using namespace std;
void factorial( unsigned long );
int main()
{
factorial(5);
}
void factorial( unsigned long number )
{
int result;
if ( number <= 1 )
cout<<endl;
else
cout<<number * factorial( number - 1 );
}
error C2297: '*' : illegal, right operand has type 'void'