create a c++ program that will accepts 9 inputs using 3 by 3
array.



create a c++ program that will accepts 9 inputs using 3 by 3 array...

Answer / s.verma

#include<iostream>
#include<conio.h>

using namespace std;

int main()
{
int matrix[3][3];

cout<<"Enter a 3x3 matrix row-wise :: \n"

for(int i=0; i<3; i++)
{
for(int j=0; j<3; j++)
cin>>matrix[i][j];
}

cout<<"\nYou eneterd :: \n"

for(int i=0; i<3; i++)
{
for(int j=0; j<3; j++)
{
cout<<matrix[i][j]<<" ";
}
cout<<"\n";
}

getch();
return 0;
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is polymorphism and example?

0 Answers  


why constructor cannt be declar virtually? why destructor cannt be overloaded?

2 Answers   Infosys,


what is the diffrence between c# and c++

5 Answers  


What is polymorphism in oops with example?

0 Answers  


what is the usage of clas templates

5 Answers  






define oops with class and object

5 Answers   HCL, Tech Mahindra,


difference between class and object

10 Answers   Chandan, IBM, Magic Soft,


What is abstraction oop?

0 Answers  


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

0 Answers   UBS,


What does and I oop mean?

0 Answers  


What is the main purpose of inheritance law?

0 Answers  


What is the fundamental idea of oop?

0 Answers  


Categories