-->
当前位置:首页 > 题库

PROGRAMMING:Finding the sum of elements in each line of matrix

Luz5年前 (2021-05-10)题库477
This problem requires programming to find the sum of elements of a given matrix.
###Input format:
Enter the first line to give two positive integers $$M $$and $$n $$($$1 / Le m, N / Le 6 $$). Next, $$M $$lines, each line gives $$n $$integers, with
Separated by spaces.
###Output format:
Each row outputs the sum of the elements of the corresponding matrix row.
###Input example:
```in
3 2
6 3
1 -8
3 12
```
###Output example:
```out
nine
-7
fifteen
```






answer:If there is no answer, please comment