// C Program Code For 3x3 Matrix Addition
#include<stdio.h>
int main()
{
int i, j, a[3][3], b[3][3], sum[3][3];
printf("Values of Matrix A: \n");
for (i=0;i<3;i++)
{
for (j=0;j<3;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("Values of matrix B: \n");
for (i=0;i<3;i++)
{
for (j=0;j<3;j++)
{
scanf("%d",&b[i][j]);
}
}
printf("Sum of Matrix: \n");
for (i=0;i<3;i++)
{
for (j=0;j<3;j++)
{
sum[i][j] = a[i][j] + b[i][j];
printf(" %d ",sum[i][j]);
}
printf("\n");
}
}