# Program for Matrix Multiplication of size 3*3

Hello Here is a C program for matrix multiplication of  size 3*3. This is the easiest process. From this code concept you can make multiplication of any size of matrix too. Just need to add some tmp locations.

 ```1 2 3 4 5 6``` `7` `8` `9` `10` `11` `12` `13` `14` `15` `16` `17` `18` `19` `20` `21` `22` `23` `24` `25` `26` `27` `28` `29` `30` `31` `32` `33` `34` `35` `36` `37` `38` `39` `40` `41` `42` `43` `44` ```#include #include //Program for Multiplication of matrix 3*3 Time and Update int main() { int a,b,c; int i,j,k,tmp1=0,tmp2=0,tmp3=0; printf("Enter value of matrix A \n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) scanf("%d",&a[i][j]); printf("\n"); } printf("Enter value of matrix B \n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) scanf("%d",&b[i][j]); printf("\n"); } for(i=0;i<3;i++) { for(j=0;j<3;j++) { tmp1=a[i][j]*b[j]+tmp1; tmp2=a[i][j]*b[j]+tmp2; tmp3=a[i][j]*b[j]+tmp3; } c[i]=tmp1; c[i]=tmp2; c[i]=tmp3; } printf("https://timeandupdate.com \n"); printf("The Multiplication is :-\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t",c[i][j]); printf("\n"); } return 0; } ```

Here is the Output: I did not check all but looks its correct.

The above program is compiled and successfully run on Code::Block 13.12.
This is easy program but you just need to focus. If you cant understand how this program flow don't forget to comment we will be back to help you.

#### Sagar Devkota

Hello This is Sagar Devkota. Studying Bachelor of Software Engineering at Pokhara University. I know something about Linux, Android, Java, Nodejs, Unity3D and 3 dots :)