1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00
202401-programming-assignments/【实践课外】13.指针1/7-1 求矩阵每行元素的和.md

30 lines
430 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 7-1 求矩阵每行元素的和
本题要求编写程序使用指针方式求一个给定的m×n矩阵各行元素之和。
### 输入格式:
输入第一行给出两个正整数m和n1≤m,n≤6再输入m行数据每行n个整数每个整数之间用空格分隔。
### 输出格式:
输出m个整数每行1个数。
### 输入样例:
```in
2 3
1 2 3
4 5 6
```
### 输出样例:
```out
6
15
```