Headlines
Loading...
C program to print the sum of diagonal elements in a matrix

C program to print the sum of diagonal elements in a matrix

write a c program to print the sum of diagonal elements in a matrix.

#include<stdio .h="">
#include<conio .h="">
void main()
{
 int a[20][20],i,j,m,n,sum=0;
 clrscr();
 printf("Enter the total number of rows in array:");
 scanf("%d",&amp;m);
 printf("Enter the total number of column in array:");
 scanf("%d",&amp;n);
  for(i=0;i</conio></stdio>
*** PLEASE checkout the Best deals from for top sites like Amazon, Flipkart etc ***