编程题:矩阵运算 - C/C++ 数组及字符串
读入一个正整数n(1≤n≤20),再读入n行n列共n²个整数并存入由二维数组表示的方阵m;计算并输出每一行的元素和;计算并输出每一列的元素和;计算并输出对角线上的元素和(即所有m[i][i]的和, i取0~n-1)。
### 输入样例:
in
3
1 2 3
4 5 6
7 8 10
### 输出样例:
out
sum of row 1 = 6.
sum of row 2 = 15.
sum of row 3 = 25.
sum of column 1 = 12.
sum of column 2 = 15.
sum of column 3 = 19.
sum of elements on the diagonal = 16.
### 感觉不会? 那试着听听**免费的B站网课**
[简洁的C和C++ - 重庆大学在线课程](https://www.bilibili.com/video/BV1it411d7zx/)
[Python编程基础及应用 - 重庆大学在线课程](https://www.bilibili.com/video/BV1kt411R7uW/)

答案:若无答案欢迎评论
### 输入样例:
in
3
1 2 3
4 5 6
7 8 10
### 输出样例:
out
sum of row 1 = 6.
sum of row 2 = 15.
sum of row 3 = 25.
sum of column 1 = 12.
sum of column 2 = 15.
sum of column 3 = 19.
sum of elements on the diagonal = 16.
### 感觉不会? 那试着听听**免费的B站网课**
[简洁的C和C++ - 重庆大学在线课程](https://www.bilibili.com/video/BV1it411d7zx/)
[Python编程基础及应用 - 重庆大学在线课程](https://www.bilibili.com/video/BV1kt411R7uW/)

答案:若无答案欢迎评论