Problem Statement
Write a program to rotate a matrix 180 degrees.
DEMO-C-32 โข Programming in C
Write a program to rotate a matrix 180 degrees.
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 4 15 5 -10 45 45 18 37 33 16 26 49 8 23 3 34 -7
-7 34 3 23 8 49 26 16 33 37 18 45 45 -10 5 15
2 5 7 48 5 -7 13 41 7 3 -4 -3
-3 -4 3 7 41 13 -7 5 48 7
4 4 44 12 22 18 -8 11 2 25 26 19 19 36 48 -8 15 46
46 15 -8 48 36 19 19 26 25 2 11 -8 18 22 12 44
2 5 17 24 31 32 9 23 8 9 8 22
22 8 9 8 23 9 32 31 24 17
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question