C Program to Find Sum of Diagonals of Matrix

Here is the C program to find sum of diagonal of a square matrix.

 

Output

Enter size of square matrix:4
Enter Elements of matrix:
1 2 3 4
5 6 7 8
9 10 11 12
10 7 6 8

First Diagonal Sum=26
Second Diagonal Sum=31

" data-link="https://twitter.com/intent/tweet?text=C+Program+to+Find+Sum+of+Diagonals+of+Matrix&url=https%3A%2F%2Fwww.thecrazyprogrammer.com%2F2013%2F03%2Fc-program-to-find-sum-of-digonals-of.html&via=">">Tweet
2 Shares

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.