input 4*4 matrix and find the sum of boundary elements.
please give the method only.
Answers
Answered by
1
Answer:
Input:
4*4 martix.
1 2 3 4
5 6 7 8
1 2 3 4
5 6 7 8.
Output:
1 2 3 4
5 8
1 4
5 6 7 8
sum = 1+2+3+4+5+8+1+4+5+6+7+8.
=54.
Okay.
In code of c language.
Hope helpful.
Similar questions