Program to find multiplication of two matrices

Write a Program to find multiplication of two matrices:-

#include<stdio.h>
void main()
{
int a[3][2],b[3][2],c[3][2],i,j;

printf("enter value for 1 matrix: \n");
for(i=0;i<3;i++)
{
for(j=0;j<2;j++)
scanf("%d",&a[i][j]);
}

printf("enter value for 2 matrix:\n ");
for(i=0;i<3;i++)
{
for(j=0;j<2;j++)
scanf("%d",&b[i][j]);
}

for(i=0;i<3;i++)
{
for(j=0;j<2;j++)
c[i][j]=a[i][j]*b[i][j];
}

printf("matrix is :\n");
for(i=0;i<3;i++)
{
for(j=0;j<2;j++)
{
printf(" %d ",c[i][j]);
}
printf("\n");
}
}
Copyright © C Program | Java | OpenGL Programming | Hadoop at Computaholics