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

PROGRAMMING:Calculate the sum of two diagonals of matrix

Luz5年前 (2021-05-10)题库484
Calculate a 4 × The sum of two diagonals of the matrix, data input from the keyboard.
For example:
$$
\begin{matrix}
1 & 2 & 3 & 4 \\
5 & 6 & 7 & 8 \\
9 & 10 & 11 & 12 \\
13 & 14 & 15 & 16 \\
\end{matrix}
$$
###Input example:
```in
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
```
###Output example:
```out
sum = 68
```







answer:If there is no answer, please comment