Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

to find the program of matrix multiplication using arrays

Answer Posted / suman kumar das.

//matrix multiplication program
#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();
int i,j,k,a[3][3],b[3][3],c[3][3],sum,m=3,l=3;

printf("\n enter value of first matrix:\n");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
scanf("%d",&a[i][j]);
}
printf("\n enter value of second matrix:\n");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
scanf("%d",&b[i][j]);
}
for(i=0;i<m;i++)
{
for(j=0;j<l;j++)
{
c[i][j]=0;
for(k=0;k<l;k++)
c[i][j]+=a[i][k]*b[k][j];
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
printf("%d",c[i][j]);
}
getch();

}

Is This Answer Correct ?    24 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to show the change in position of a cursor using c

993


What do you mean by c what are the main characteristics of c language?

976


What does %p mean?

1030


What is adt in c programming?

1095


if p is a string contained in a string?

1792


Why c language is called c?

947


What are the keywords in c?

1076


What is the c language function prototype?

1039


Is main is user defined function?

1069


What are identifiers in c?

1142


Explain what are its uses in c programming?

1013


Is c is a procedural language?

1031


Why c language?

1005


Explain union. What are its advantages?

1005


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2075