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 does I oop mean?

0 Answers  


What is the difference between declaration and definition?

20 Answers   IBS,


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

0 Answers  


What is coupling in oop?

0 Answers  


what is the new version of c++

1 Answers   Ignou, Pramata, Satyam,


How do you make derived class as an abstract class?

1 Answers   Convergys, TCS,


How can we use the preprocessor #if and #elseif.

2 Answers  


What is constructor in oop?

0 Answers  


write a c++ program to find maximum of two numbers using inline functions.

3 Answers   IBM,


What is oops in simple words?

0 Answers  


How to overload postfix operator in c++

1 Answers   Mphasis,


How do you achieve runtime polymorphism?

0 Answers  


Categories