Problem Statement
Matrix Sum
Write a program to calculate and print the sum of all elements in an N x M matrix.
DEMO-C-32 โข Programming in C
Write a program to calculate and print the sum of all elements in an N x M matrix.
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.
2 2 25 48 23 31
127
4 3 34 43 32 -2 39 49 42 6 10 -2 43 2
296
5 4 47 7 7 10 17 8 6 8 5 7 -9 -2 32 7 -9 4 -5 28 28 10
206
4 3 8 12 4 45 44 -7 33 50 42 6 -5 44
276
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question