Submitted by Muzammil Muneer on Friday, September 19, 2014 - 09:07.

#include<stdio.h> #include<conio.h>

int main() { int matrix[100][100]; int rows,columns; int i,j; for( i=0;i<rows;i++) { for( j=0;j<columns;j++) { } }

int k,l; for( k=0;k<rows;k++) { for( l=0;l<columns;l++) { } }

int sum=0,m; for(m=0;m<rows;m++) { sum=sum+matrix[m][m]; }

j=columns-1; sum=0; for(m=0;m<rows && j>=0;m++,j--) { sum=sum+matrix[m][j]; } }

- 48 views