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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object-oriented programming? Webopedia definition

954


Can a varargs method be overloaded?

812


Which method cannot be overridden?

764


What is difference between inheritance and polymorphism?

772


What is constructor in oop?

816


What is abstraction encapsulation?

862


Which is not an object oriented programming language?

732


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2272


What are functions in oop?

778


what is the sylabus for priliminaries?

1903


What is encapsulation and abstraction? How are they implemented in C++?

847


Why do we use oops?

755


What is coupling in oop?

775


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

1887


What is the use of oops?

796