Write a program to perform addition and subtraction of two matrices whose orders are up to 10x10.
#include< stdio.h>
main( )
{
int i,j,r1,c1,a[10][10],b[10][10];
clrscr( );
printf("Enter Order of Matrix A & B up to 10X10:");
scanf("%d%d",&r1,&c1);
printf("Enter Elements of Matrix of A:\n");
for(i=0;i<r1;i++)
{
for(j=0;j<c1;j++)
scanf("%d",&a[i][j]);
}
printf("Enter Elements of Matrix of B:\n");
for(i=0;i<r1;i++)
{
for(j=0;j<c1;j++)
scanf("%d",&b[i][j]);
}
printf("\n Matrix Addition\n");
for(i=0;i<r1;i++)
{
for(j=0;j<c1;j++)
printf("%5d",a[i][j]+b[i][j]);
printf("\n");
}
getch();
}