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...

write the program to find multiplication of 2-D matrix??????????

Answer Posted / keshave12

#include<stdio.h>
void main()
{
int a[10][10],b[10][10],c[10][10],i,j,c1,r1,c2,r2,ir2;
printf("enter the row and column of 1st matrix");
scanf("%d%d",&r1,&c1);
printf("enter the row and column of 2nd matrix");
scanf("%d%d",&r2,&c2);
if(c1==r2)
printf("multiplication can be done");
printf("enter the element of 1st matrix");
for(i=0;i<r1;i++)
for(j=0;j<c1;j++)
scanf("%d",&a[i][j]);
printf("enter the element of 2nd matrix");
for(i=0;i<r2;i++)
for(j=0;j<c2;j++)
scanf("%d",&b[i][j]);
for(i=0;i<c1;i++)
for(j=0;j<r2;j++)
{
c[i][j]=0;
for(ir2=0;ir2<c1;ir2++)
c[i][j]=a[i][ir2]*[ir2][j];
}
printf("the multiplication of two matrices is:\n");
for(i=0;i<c1;i++)
for(j=0;j<r2;j++)
printf("%3d",c[i][j]);
printf("\n");
getch();
}

Is This Answer Correct ?    10 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is union in c?

1062


How can you allocate arrays or structures bigger than 64K?

1085


Write a program to print factorial of given number without using recursion?

952


Which driver is a pure java driver

1535


Explain what is the difference between null and nul?

1087


What is the deal on sprintf_s return value?

1070


Can you please explain the difference between malloc() and calloc() function?

1053


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1744


What is nested structure with example?

1016


Differentiate between static and dynamic modeling.

1054


What is a list in c?

986


Explain why c is faster than c++?

1006


Write a program to find factorial of a number using recursive function.

1069


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

964


What is static and auto variables in c?

1023