Question
FOR C++: Please design, write the code and create the requisite submission files for the following problem: Functional Requirements: A menu-driven program that offers the
FOR C++:
Please design, write the code and create the requisite submission files for the following problem:
Functional Requirements:
A menu-driven program that offers the user 5 options as follows:
Menu:
1. Display array
2. Multiply each element in the array by 3.
3. Swap the values in row two with the values in row three.
4. Calculate the SUM of all elements and display that number.
5. Exit
Programming Requirements:
In main(), declare and initialize a 2-dimensional array that contains 5 x 5 elements. Initialize the elements to:
1,2,3,4,5
-20, -40,-60, -80, -100
3,3,3,3,3
5, 7, 9, 11, 13
-15, -25, -35, -45, -55
Display the menu and then execute the user's choice. Keep displaying the menu (and executing the user's choice) until the user chooses Option 5. (See pseudocode in this lesson for design help.)
Execute the chosen menu option by passing the array to a specific function which will do the work (in other words, there will be 4 array processing functions and one exit function).
No global variables, although global constants are fine. Remember, you must pass the array to the functions and not do the work in main().
Properly document your code with header blocks for each function and internal comments. I have attached a template program to this lesson so you can see what I am looking for.
Notes:
In menu option 2, please triple the actual values in the array. Don't print the array. That's a different menu option.
In menu option 3, please swap the actual array values. Don't display the array. That's a different menu option.
SHOW PROGRAM WORKS WITH A PICTURE PLEASE
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