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

PROGRAMMING:Find the sum of all negative numbers of elements in each row of matrix

Luz5年前 (2021-05-10)题库376
This problem requires the preparation of procedures to find a given M × The sum of all negative numbers of the elements of each row of N 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 all negative sums 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
-3
-5
-5
```






answer:If there is no answer, please comment