- Back to Home »
- ARRAY PROGRAMS , GENERAL OR BASIC PROGRAMS »
- C Program To Multiply Two Matrix, Multiplication of 3x3 Matrix in C
Posted by : ANIMESH SHAW
Tuesday, 1 May 2012
#include
<stdio.h>
#include <conio.h>
#include
<stdlib.h>
main()
{
int a[3][3], b[3][3],
c[3][3];
int i, j, k;
clrscr();
printf(" Enter
elements of first matrix\n ");
for( i = 0; i < 3;
i++ )
{
for( j = 0; j < 3; j++ )
{
printf(" \n Enter a[%d] [%d]
element: ", i, j);
scanf(" %d ", &a[i] [j]
);
}
}
printf(" Enter
elements of second matrix\n ");
for( i = 0; i < 3;
i++ )
{
for( j = 0; j < 3; j++ )
{
printf(" \n Enter b[%d] [%d]
element: ", i, j );
scanf(" %d ", &b[i][j]);
}
}
printf(" \n\n
First matrix is\n\n ");
for( i = 0; i < 3;
i++ )
{
for( j = 0; j < 3; j++ )
printf(" %2d ", a[i][j]);
printf(" \n ");
}
printf("
\n\nSecond matrix is\n ");
for( i = 0; i < 3;
i++ )
{
for( j = 0; j < 3; j++ )
printf(" %2d ", b[i][j]);
printf(" \n ");
}
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(" \n\n
Multiplication of two matrices is\n ");
for( i = 0; i < 3;
i++ )
{
for(j = 0; j < 3; j++ )
printf(" %2d ", c[i][j]);
printf(" \n ");
}
getch();
}

Thankѕ for sharing such a faѕtiԁious thіnking, piecе оf writing is
nіce, thats why i have read it entirely
Feel free to surf my weblog ... loans for bad credit
Amazing! This blog looks just like my old one! It's on a totally different subject but it has pretty much the same page layout and design. Excellent choice of colors!
Here is my web blog - website
I wish getting over a broken heart can be so easy as following a few steps.
. but its not…
Feel free to surf to my web site :: influence
I'm gone to inform my little brother, that he should also visit this web site on regular basis to obtain updated from most recent information.
hardwood floor refinishing
Review my web site; engineered hardwood floors
Also see my page - hardwood flooring
Hello, constantly i used to check blog posts here in the early
hours in the dawn, for the reason that i like to find out more and more.
Also visit my weblog; toenail fungus treatment
thanks !! very helpful post!
Here is my webpage ... website
Hello, i think that i saw you visited my blog so
i came to “return the favor”.I am trying to find things to enhance my site!
I suppose its ok to use some of your ideas!!
hardwood flooring
My weblog ... hardwood floors installation
Hello, i think that i saw you visited my blog so i came to “return the favor”.
I am trying to find things to enhance my site!I suppose its ok
to use some of your ideas!!
hardwood flooring
my page; hardwood floors installation
my site: refinishing hardwood floors
Hi there! This post couldn’t be written any better! Reading through this post reminds me of my previous room mate!
He always kept talking about this. I will forward this article to him.
Pretty sure he will have a good read. Thank you for sharing!
Feel free to visit my website :: website
he blog was how do i say it… relevant, finally something that helped
me. Thanks
My web blog website