#include<stdio.h>
int main()
{
int a[3][3],b[3][3],c[3][3],i,j,m,n;
printf("Enter the number of rows in the matrix:");
scanf("%d\n",&i);
printf("Enter the number of columns in the matrix:");
scanf("%d\n",&j);
printf("Enter the elements in the matrix A:");
{
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
scanf("%d\n",&a[i][j]);
}
}
printf("Enter the elements in the matrix B:");
{
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
scanf("%d\n",&b[i][j]);
}
}
{
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
printf("%d \n",c[i][j]=a[i][j]+b[i][j]);
}
}
printf("The resultant matrix is:\n");
{
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
scanf("%d\n",&c[i][j]);
}
}
printf("\n");
return 0;
}