Question
Write a C++ program that will allow a user to observe and manipulate 2-D arrays. Your program should assume that the data are integers and
Write a C++ program that will allow a user to observe and manipulate 2-D arrays. Your program should assume that the data are integers and the dimensions of the matrix are not larger than 12x12. A menu should allow the user to choose between the following options:
Read array data from file
File will contain the number of rows and number of columns, followed by the data
The name of the file will be assign12-in.txt
Display the array in row-major order
Fill the array with random numbers in the range [1..1000]
Ask the user for a value and set all of the array items to that value
Display the average value of the data items
Display a count of the number of data items that are multiples of 5
Display a count of the number of negative data items
Terminate 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