Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

ISBN: 1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago