This Program has Five parts. Each part must be a Function. When program runs, a Menu (using do while loop) should be displayed. 1. Factorial2. Find Smallest Number3. Find Largest Number4. Print "Got...

1 answer below »
This Program has Five parts. Each part must be a Function. When program runs, a Menu (using do while loop) should be displayed.
1. Factorial2. Find Smallest Number3. Find Largest Number4. Print "Got It" or "Something Else"5. Detection0. For Exit1. In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 6! = 6 x 5 x 4 x 3 x 2 x 1 = 720
Write a program that takes integer from user and show the factorial for that number. Must use for loop and functions


2. Write a function that takes two integers from the users and display the smallest number.
3. Write a function that takes two integers from the users and display the largest number.


4. Write a function that asks the user to enter an integer. If the user enters '1', print "Got 1". If the user enters '66', print "Got 66". If the user enters something other than these two numbers, print "Got something else". The program should use a switch statement.


5. Write a function that asks the user to enter an integer, then gets the input from the user. The program should repeatedly ask the user to enter an integer until the user enters an integer greater than 10; then it should print "Integer greater than 10 detected!" and should end. The program must contain only two cout statements!
Answered Same DayMay 09, 2021

Answer To: This Program has Five parts. Each part must be a Function. When program runs, a Menu (using do while...

Aditya answered on May 09 2021
167 Votes
#include
using namespace std;
void printFactorial(int number)
{
int factorial = 1;

while (number > 0)
{
factorial = factorial * number;
number--;
}
cout<<"Factorial is: "<}
void printSmallestNumber(int number1, int number2)
{
if(number1 < number2)
{
cout< }
else if(number2 < number1)
{
cout< }
else
{
cout< }
}
void printLargestNumber(int number1, int number2)
{
if(number1 > number2)
{
cout< }
else if(number2 > number1)
{
cout< }
else
{
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here