Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started