Objective
The transpose of a matrix swaps rows and columns: the element at row i and column j moves to row j and column i.
Instructions
- The first line has the number of rows
fand columnsc; then comeflines with the values separated by spaces. - Show the transposed matrix, one row per line and with the values separated by spaces.
2 3
1 2 3
4 5 6
1 4
2 5
3 6
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise