بيان المشكلة
Write a program to calculate the sum of elements for each row in an N x M matrix. Print N integers separated by space.
DEMO-C-32 • Programming in C
Write a program to calculate the sum of elements for each row in an N x M matrix. Print N integers separated by space.
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 4 20 25 25 2 29 13 24 10
72 76
5 5 41 19 35 10 39 35 5 30 35 37 7 41 43 12 29 19 10 48 41 14 25 40 32 49 37
144 142 132 132 183
5 2 4 -2 4 22 47 14 32 50 19 -4
2 26 61 82 15
2 2 15 21 27 30
36 57
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question