Given a two-dimensional array (matrix) and the two numbers: i and j. Swap the columns with indexes i and j within the matrix.
Input contains matrix dimensions n and m, not exceeding 100, then the elements of the matrix, then the indexes i and j.
Given a two-dimensional array (matrix) and the two numbers: i and j. Swap the columns with indexes i and j within the matrix.
Input contains matrix dimensions n and m, not exceeding 100, then the elements of the matrix, then the indexes i and j.
Sample Input 1:
3 4
11 12 13 14
21 22 23 24
31 32 33 34
0 1Sample Output 1:
12 11 13 14
22 21 23 24
32 31 33 34Create a free account to access the full topic