/*Input two matrices of size 3x3. Add them and output the resultant matrix. The matrix should be printed in the correct format. */ #include main() { int a[3][3],b[3][3],c[3][3],i,j; printf("Enter the first matrix:\n"); for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&a[i][j]); printf("Enter the second matrix:\n"); for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&b[i][j]); for(i=0;i<3;i++) for(j=0;j<3;j++) c[i][j]=a[i][j]+b[i][j]; printf("The Resultant Matrix is:\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d \t ",c[i][j]); printf("\n"); } }