Question: #include using namespace std; int fact(int num) { ....... } int main() { int n; cout < n; cout <
#include
using namespace std;
int fact(int num)
{
.......
}
int main()
{
int n;
cout<<"Enter any integer to get the factorial:"< cin>>n; cout<<"Your number you entered is:"< cout< return 0; } The body of the fact function in order to calculate the factorial of the entered number by the user can be as: (Hint: e.g: factorial of 6 = 720) Select one: a. if (num == 0) return 1; else return num * fact(num + 1); b. if (num == 1) return 1; else return num * fact(num - 1); c. if (num == 0) return 1; else return num * fact(num - 1); d. if (num == 0) return 1; else return num + fact(num - 1);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
