C Program to Find the Diagonal Sum of Matrix

This is the C Program to find the diagonal sum of a matrix
[cc lang=”c”]
#include
void main()
{
int a[10][10],i,j,fwsum=0,rwsum=0,n;
printf(“Enter the no. of rows and columns for Matrix :”);
scanf(“%d”,&n);
printf(“nnNow enter the Matrix A[%d][%d] :-nn”,n,n);
for(i=0;i

You may also like...

Leave a Reply

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