Question: C++ How can I edit the following lines so it prints out the values in the array as a 4x4 matrix? Right now it only

C++ How can I edit the following lines so it prints out the values in the array as a 4x4 matrix? Right now it only prints in a straight line, one value after another. The values of the array are determined by a random number generator. The arrays are martixa[x][y] and same but for martrixb.

cout << "Matrix 1 is ... "; for (x = 0; x < 4; x++) { for (y = 0; y < 4; y++) cout << matrixA[x][y] << " "; } cout << " Matrix 2 is... "; for (x = 0; x < 4; x++)

{ for (y = 0; y < 4; y++) cout << matrixB[x][y] << " "; }

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!