/*PROGRAM TO PRINT THE PRODUCT OF TWO 3X3 MATRICES USING ARRAYS*/

 

#include<stdio.h>

#include<conio.h>

void main()

{

int a[3][3],b[3][3],c[3][3],i,j,k;

clrscr();

 

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

printf(“\nEnter a%d%d=”,i,j);

scanf(“%d”,&a[i][j]);

}

}

 

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

printf(“\t Enter b%d%d=”,i,j);

scanf(“%d”,&b[i][j]);

}

}

 

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

printf(“\n\ta%d%d=%d”,i,j,a[i][j]);

}

}

 

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

printf(“\n\t b%d%d=%d “,i,j,b[i][j]);

}

}

 

 

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

c[i][j]=0;

for(k=0;k<3;k++)

{

c[i][j]=c[i][j]+a[i][k]*b[k][j];

}

printf(“\t%d”,c[i][j]);

}

printf(“\n”);

}

 

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

printf(“\t%d”,c[i][j]);

}

}

getch();

}

444 total views, 5 views today

Get Free Email Updates..!
Join us for FREE to get instant email updates..! GobsInfo- Everything Unlimited
We hate spam. Your email address will not be sold or shared with anyone else.