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

PROGRAMMING:Finding the sum of all positive numbers of elements in each row of matrix

Luz5年前 (2021-05-10)题库473
This problem requires the preparation of procedures to find a given M × N the sum of all positive numbers of the elements of each row of a matrix.
###Input format:
Enter the first line to give two positive integers m and n (1 ≤ m, n ≤ 10). Then m lines, each line gives n integers separated by spaces.
###Output format:
Each row outputs the sum of all positive numbers of the elements of the corresponding matrix row.
###Input example:
For example:
```in
3 4
-3 1 5 2
-1 -4 6 7
1 0 2 3
```
###Output example:
```out
eight
thirteen
six
```







answer:If there is no answer, please comment