how can i get my output of a factorial to look like this:
Enter a number: 5
Factorial expansion phase:
5
4
3
2
1
Factorial wrapup phase:
1
2
6
24
120
The factorial of 5 is 120.
im using the function below to find factorial:
int factorial(int n)
{
if (n == 0)
return 1;
else
return (n * factorial (n - 1));
}