Question: (C++) Write a program that reads 12 integers into a 2d array with 3 rows and 4 columns and two additional integers indicating the indices

(C++) Write a program that reads 12 integers into a 2d array with 3 rows and 4 columns and two additional integers indicating the indices of two columns. Perform the following tasks.

(1) Reprint the 2D array

(2) Swap the columns with the indices specified by the last two integers and output the updated array. If either one of these two integers has value smallee than 0 or larger than 3, the program should output Column does not exist and exit.

(C++) Write a program that reads 12 integers into a 2d array

Ex: if the user enter: 5 7 3 4 6 4 3 8 5 6 9 5 1 2 the program will output: 5 7 3 4 6 4 3 8 5 6 9 5 5 3 7 4 6 3 48 5 9 6 5

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!