#include<stdio.h>

#include<conio.h>

int main()

{

int array[10][10];

int i,j,m,n,sum=0;

clrscr();

printf(“Enter the order of the matrix”);

scanf(“%d %d”,&m,&n);

printf(“Enter the co-efficients of the matrix\n”);

for(i=0;i<m;i++)

{

for(j=0;j<n;j++)

{

scanf(“%d”, &array[i][j]);

}

}

for (i=0;i<m;i++)

{

for (j=0;j<n;j++)

{

sum = sum + array[i][j] ;

}

printf(“Sum of the %d row is = %d\n”, i, sum);

sum = 0;

}

getch();

return(0);

}

Output :-

Advertisements