#include<stdio.h>
#include<conio.h>
main()
{
int i,j,m1,n1,a[10][10],sum=0;
printf("Enter the Row and column\n");
scanf("%d %d",&m1,&n1);
printf("Enter the Matrix \n");
for(i=0;i<m1;i++)
for(j=0;j<n1;j++)
{
scanf("%d",&a[i][j]);
sum+=a[i][j];
}
printf("\nSum:%d",sum);
}
#include<conio.h>
main()
{
int i,j,m1,n1,a[10][10],sum=0;
printf("Enter the Row and column\n");
scanf("%d %d",&m1,&n1);
printf("Enter the Matrix \n");
for(i=0;i<m1;i++)
for(j=0;j<n1;j++)
{
scanf("%d",&a[i][j]);
sum+=a[i][j];
}
printf("\nSum:%d",sum);
}
No comments:
Post a Comment
Thank you for using this blog.