Question: Write a C++ program to run a menu-driven program with the following choices: Compute the Factorial of a number Compute the Superfactorial of a number
Write a C++ program to run a menu-driven program with the following choices:
- Compute the Factorial of a number
- Compute the Superfactorial of a number
- Quit
Sample run examples:
Welcome to the playing with numbers! 1) Compute the Factorial of a number 2) Computer the SuperFactorial of a number 3) Quit Select an option (1..3)..1 Enter in a positive number greater than 0...0 Enter in a positive number greater than 0...-9 Enter in a positive number greater than 0...2 Factorial(2) = 2 1) Compute the Factorial of a number 2) Computer the SuperFactorial of a number 3) Quit Select an option (1..3)..1 Enter in a positive number greater than 0...3 Factorial(3) = 6 1) Compute the Factorial of a number 2) Computer the SuperFactorial of a number 3) Quit Select an option (1..3)..1 Enter in a positive number greater than 0...4 Factorial(4) = 24 1) Compute the Factorial of a number 2) Computer the SuperFactorial of a number 3) Quit Select an option (1..3)..2 Enter in a positive number greater than 0...2 SuperFactorial(2) = 2 1) Compute the Factorial of a number 2) Computer the SuperFactorial of a number 3) Quit Select an option (1..3)..2 Enter in a positive number greater than 0...3 SuperFactorial(3) = 12 1) Compute the Factorial of a number 2) Computer the SuperFactorial of a number 3) Quit Select an option (1..3)..2 Enter in a positive number greater than 0...4 SuperFactorial(4) = 288 1) Compute the Factorial of a number 2) Computer the SuperFactorial of a number 3) Quit Select an option (1..3)..2 Enter in a positive number greater than 0...5 SuperFactorial(5) = 34560 1) Compute the Factorial of a number 2) Computer the SuperFactorial of a number 3) Quit Select an option (1..3)..6 Select an option (1..3)..0 Select an option (1..3)..3
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
