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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!