#include<stdio.h>
#include<conio.h>
void main()
{
int r1,c1,i,j;
int matrix[3][3];
clrscr();
printf("\n ENTER THE ROW OF THE MATRIX 1 =");
scanf("%d",&r1);
printf("\n ENTER THE COLOM OF THE MATRIX 1 =");
scanf("%d",&c1);
printf("\n ENTER DATA FOR MATRIX");
for(i=0;i<r1;i++)
{
for(j=0;j<=c1;j++)
{
scanf("%d",& matrix[i][j]);
}
}
printf("SHOW THE RESULT");
for(i=0;i<c1;i++)
{
for(j=0;j<c1;j++)
{
sum=sum+mat[i][j];
}
}
printf("sum=%d",sum);
getch();
}
No comments:
Post a Comment