the solution is here
#include<stdio.h>
#include<stdlib.h>
void main()
{
system("clear"); // clear screen
int a[10][10],b[10][10],c[10][10],r1,c1,r2,c2,i,j,k;
#include<stdlib.h>
void main()
{
system("clear"); // clear screen
int a[10][10],b[10][10],c[10][10],r1,c1,r2,c2,i,j,k;
printf("\n Enter a number of first row ");
scanf("%d",&r1);
printf("\n Enter a number of first collimn ");
scanf("%d",&c1);
printf("\n \n enter a numbe of first matrix \n");
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
scanf("%d",&a[i][j]);
}
}
scanf("%d",&r1);
printf("\n Enter a number of first collimn ");
scanf("%d",&c1);
printf("\n \n enter a numbe of first matrix \n");
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
scanf("%d",&a[i][j]);
}
}
printf("Enter a row of second matrix ");
scanf("%d",&r2);
printf("Enter a collinm of second matrix");
scanf("%d",&c2);
for(i=0; i<r2; i++)
{
for(j=0; j<c2; j++)
{
scanf("%d",&b[i][j]);
}
}
system("clear");
printf("\n\n entered a element of first matrix \n\n ");
scanf("%d",&r2);
printf("Enter a collinm of second matrix");
scanf("%d",&c2);
for(i=0; i<r2; i++)
{
for(j=0; j<c2; j++)
{
scanf("%d",&b[i][j]);
}
}
system("clear");
printf("\n\n entered a element of first matrix \n\n ");
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
printf("\t%d",a[i][j]);
}
printf("\n");
}
printf("\n\n ENtered a element of aecond matrix \n\n");
for(i=0; i<r2; i++)
{
for(j=0; j<c2; j++)
{
printf("\t%d",b[i][j]);
}
printf("\n");
}
printf("\n\n Addition of two matrix\n\n");
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
printf("\t%d",a[i][j]+b[i][j]);
}
printf("\n");
}
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
printf("\t%d",a[i][j]+b[i][j]);
}
printf("\n");
}
printf("\n\n Matrix substration \n\n");
for(i=0; i<r1; i++)
{
For(j=0; j<c1; j++)
{
printf("\t%d",a[i][j]-b[i][j]);
}
printf("\n");
}
{
For(j=0; j<c1; j++)
{
printf("\t%d",a[i][j]-b[i][j]);
}
printf("\n");
}
printf("\n\n Multiply of two matrix \n\n");
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
c [i][j]=0;
for(k=0; k<c1; k++)
{
c[i][j] +=a[i][k]*b[k][j];
}
}
}
{
for(j=0; j<c1; j++)
{
c [i][j]=0;
for(k=0; k<c1; k++)
{
c[i][j] +=a[i][k]*b[k][j];
}
}
}
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
printf("\t%d",c[i][j]);
}
printf("\n");
}
}