Question: Write a menu driven program that prints the menu in the sample run. The program allows the user to run the program as long as
Write a menu driven program that prints the menu in the sample run. The program allows the
user to run the program as long as the user wishes.
If a user selected the program prints a random number between and
If a user selected the program prints a random negative odd number between and
If a user selected the program generates and prints random numbers between
and
If a user selected the program generates random numbers and prints their sum
If a user selected the program exits.
Here is a sample run:
Enter to generate a random number between and
Enter to generate a random negative odd number between and
Enter to generate random numbers between and
Enter to generate random numbers between and and calculates their sum
Enter to exit
Random number between and :
Enter to generate a random number between and
Enter to generate a random negative odd number between and
Enter to generate random numbers between and
Enter to generate random numbers between and and calculates their sum
Enter to exit
Random negative odd number between and :
Enter to generate a random number between and
Enter to generate a random negative odd number between and
Enter to generate random numbers between and
Enter to generate random numbers between and and calculates their sum
Enter to exit
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
