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 |
What are the benefits of interface?
Why we are use # in begning of programme of c++.
WHAT'S THE OOPS BASIC OOPS CONCEPTS IN DOTNET
what are the characteristics of oops?
why c++ is called OOPS? waht is inherutance? what is compiler?
What is destructor in oop?
how many types of notations are in java
1 Answers National University of Modern Languages (NUML),
what's the basic's in dot net
what is different between oops and c++
What is the difference between the C & C++?
Out of 4 concepts, which 3 C++ Follow?
What is Iteration Hierarchy? What is what is Object behavioral concept?