You need to end the recursion at some point:
int factorial(int b) /*Function definition*/
{
if (b == 0) return 1;
return b*factorial(b-1);
}
You need to end the recursion at some point:
int factorial(int b) /*Function definition*/
{
if (b == 0) return 1;
return b*factorial(b-1);
}