Write a program to multiply 3x3 matrics
Answer / 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 |
wht is ditch
to find out the minimum of two integer number of two different classes using friend function
What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required
Why is oop better than procedural?
What is polymorphism explain?
Difference ways of Polymorphism?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
Why we use classes in oop?
What is the default size allocated for array in the statement if size not specified " int a[] "
What is encapsulation in oops?
You have one base class virtual function how will call that function from derived class?
What is namespace?