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);
scanf("%d",&r1);
printf("\n Enter a number of first colloumn");
scanf("%d",&c1);
printf("\n \n enter a elements of first matrix \n");
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
scanf("%d",&a[i][j]);
}
}
printf("\n \n enter a elements of first matrix \n");
for(i=0; i<r1; i++)
{
for(j=0; j<c1; j++)
{
scanf("%d",&a[i][j]);
}
}
// Above is first matrix elements
printf("Enter a row of second matrix ");
scanf("%d",&r2);
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"); // clear screen
printf("\n\n entered a element of first matrix \n\n "); // element print
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 second matrix \n\n"); //print second matrix
for(i=0; i<r2; i++)
{
for(j=0; j<c2; j++)
{
printf("\t%d",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");
}