written by sekhar
written on 17/07/07
modified on 17/07/07 */
#include
main()
{
int i,j,k,l,m,n,o;
char a[3][3],b[3][3],c[3][3],d[3];
printf("enter the elements of first matrix\n");
for(i=1;i<=3;i++)
{
for(j=1;j<=3;j++)
{
printf("\nenter(%d,%d)element:",i,j);
scanf("%c",&a[i][j]);
}
printf("\n");
} //scan of first matrix
printf("enter the elements of second matrix\n");
for(k=1;k<=3;k++)
{
for(l=1;l<=3;l++)
{
printf("\nenter(%d,%d)element:",k,l);
scanf("%c",&b[k][l]);
}
printf("\n");
} //scan of second matrix
for(m=1;m<=3;m++)
{
for(n=1;n<=3;n++)
{
for(o=1;o<=3;o++)
d[o]=a[m][o]*b[o][n];
c[m][n]=d[1]+d[2]+d[3];
printf("\t%c",c[m][n]);
}
printf("\n");
}
}

No comments:
Post a Comment