Answer Posted / sandip khairnar
#include<conio.h>
void main()
{
int i,j,k,sum,a[3][3],b[3][3],c[3][3];
clrscr();
cout<<"enter matrix1";
for(i=0;i<3;i++)
for(j=0;j<3;j++)
cin>>a[i][j];
cout<<"enter matrix2";
for(i=0;i<3;i++)
for(j=0;j<3;j++)
cin>>b[i][j];
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
sum=0;
for(k=0;k<3;k++)
sum=sum+(a[i][k]*b[k][j]);
c[i][j]=sum;
}
}
cout<<"output:"<<endl;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
cout<<c[i][j]<<" ";
cout<<endl;
}
}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is difference between inheritance and polymorphism?
What is the advantage of oop over procedural language?
What is overriding in oop?
Can we have inheritance without polymorphism?
What is abstraction with example?
What are oops functions?
What are the advantages of polymorphism?
What is abstraction in oop with example?
• What are the desirable attributes for memory managment?
What is polymorphism oop?
Is enum a class?
What do you mean by Encapsulation?
What is the problem with multiple inheritance?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
any one please tell me the purpose of operator overloading