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
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