Write a C++ Program to Find Sum Above and Below of Main Diagonal Matrix

By | December 27, 2016

C++ Program to Find Sum of Main Diagonal Matrix


Write a C++ Program to Find Sum Above and Below of Main Diagonal Matrix. Here’s simple Program to Find Sum Above and Below of Main Diagonal Matrix in C Programming Language.


Definition Of Main Diagonal : :


Main Diagonal of a matrix consists of the elements of a square from the upper left element proceeding to the down right element diagonally.

More About Main Diagonal :

    The sum of the elements of the main diagonal of a matrix is called Trace of the matrix.

Examples of Main Diagonal :

 example of Main Diagonal

The elements 1, 5, and 9 are the elements of the main diagonal of a 3 × 3 matrix.


Below is the source code for C++ Program to Find Sum Above and Below of Main Diagonal Matrix which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :



OUTPUT : :



If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach upto you in the short interval.


Thanks for reading the post….

Leave a Reply