Question: Write a menu-driven program that allows a user to input four numbers and then choose between finding the smallest, largest, sum and average. All the

Write a menu-driven program that allows a user to input four numbers and then choose between finding the smallest, largest, sum and average. All the choices are to be functions including the menu. The five functions are vSmallest, vLargest, vSum, vAverage and vMenu. Use a switch statement to determine which action to take. Provide an error message if an invalid choice is entered. The program must allow the end user to view all four options before exiting (with the use of a while loop). Using C language.

Sample Menu Function Select 1 -> Smallest 2 -> Largest 3 -> Sum 4 -> Average 5 -> Exit Program Output format is shown below. Please enter four numbers: 3,4,5,6 Please select an option: Enter 1 to view the Smallest number Enter 2 to view the Largest number Enter 3 to view the Sum of the numbers Enter 4 to view the Average of the numbers Enter 5 to Exit the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!