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
Posted: Fri May 20, 2022 12:23 pm
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)
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)