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

PROGRAMMING:Finding the summation of peripheral elements of two dimensional array

Luz5年前 (2021-05-10)题库417
Find a two-dimensional array of peripheral elements of the cumulative sum.
Enter the number of rows m (m < 10), the number of columns n (n < 10) and the value of each element of a two-dimensional array. Output the sum of peripheral elements.
###Input format:
The number of rows and columns of the input first row matrix, starting from the second row, is the input of matrix elements.
###Output format:
Output the sum of peripheral elements.
###Input example:
```in
Here is a set of inputs. For example:
3 4
1 2 3 4
5 6 7 8
1 2 3 4
```
###Output example:
```out
The corresponding output is given here. For example:
thirty-three
```






answer:If there is no answer, please comment