jituTechnology

jituTechnology

write a program for matrix multiplication of size 3*3

write a program for matrix multiplication of size 3*3

/*a program for matrix multiplication of size 3*3
programmed by:
Name: Jitendra Kr Yadav
roll: 10116
date: 29 april 2011*/
#include <stdio.h>
#include <conio.h>
void main()
{
int c[3][3];
int a[3][3]={{1,2,3},{4,5,6},{6,7,8}};
int b[3][3]={{9,8,7},{6,5,4},{3,2,1}};
int i,j,k;
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][j]*b[k][j];
         }
      }
   }
}
for(i=0;i<3;i++)
        {
                printf(“\n”);
                for(j=0;j<3;j++)
                printf(“%d\t”,c[i][j]);
        }
getch();
}
Output
18  30  36
72  75  72
102 105 96
Add a comment

Comments (1)

  1. Carly SomogyiApril 4, 2012 Reply
    I discovered your weblog site on google and test a few of your early posts. Proceed to maintain up the excellent operate. I simply additional up your RSS feed to my MSN News Reader. In search of forward to studying extra from you later on!…

Add a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

April 2024
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930