what is 0 factorial code example
Example 1: factorial of 0
factorial(0) = 1
Example 2: factorial
unsigned long long factorial(unsigned long long num){
if(num<=0)
return 1;
return num * factorial(num-1);
}
factorial(0) = 1
unsigned long long factorial(unsigned long long num){
if(num<=0)
return 1;
return num * factorial(num-1);
}