بيان المشكلة
Write a program to compute the transpose of an N x M matrix. The transpose is obtained by swapping rows and columns.
DEMO-C-32 • Programming in C
Write a program to compute the transpose of an N x M matrix. The transpose is obtained by swapping rows and columns.
Input: Dimensions N M followed by the matrix elements.
Output: The formatted result as specified.
Submit runs every public testcase in this browser. Results and code never leave this device.
4 5 47 -6 14 34 9 1 23 6 6 46 2 7 8 2 14 -5 32 3 26 -2
47 1 2 -5 -6 23 7 32 14 6 8 3 34 6 2 26 9 46 14 -2
2 2 50 25 14 38
50 14 25 38
5 4 44 23 11 46 -2 -8 20 27 25 11 12 49 4 2 3 18 35 6 15 39
44 -2 25 4 35 23 -8 11 2 6 11 20 12 3 15 46 27 49 18 39
2 3 11 21 23 1 -5 44
11 1 21 -5 23 44
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question