1. Write a menu-driven* program in C++ that displays the user the following list, CHOOSE A NUMBER FROM 1 TO 6 1. Find th

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1. Write a menu-driven* program in C++ that displays the user the following list, CHOOSE A NUMBER FROM 1 TO 6 1. Find th

Post by answerhappygod »

1. Write a menu-driven* program in C++ that displays the user
the following list,
CHOOSE A NUMBER FROM 1 TO 6
1. Find the sum of elements
2. Find the average of elements
3. Find the maximum of the array
4. Find the minimum of the array
5. Find the multiplication of elements
6. Exit
The program should take 10 numbers from the user and store them
in an array called nums. The program should perform an operation
according to the options in the menu. After the program has
finished the operation, the user should be asked if he/she wants to
continue, if they want to continue the screen should be cleared
(pervious result) and the menu displayed again. Once the user
chooses Exit, the program should terminate.
(* menu-driven program: A program that obtains input from a user
by displaying a list of options – the menu – from which the user
indicates his/her choice.) (The process of filling the array with
user inputs happens before the menu displays) (Use if – else if –
else structure)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply