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
What is object-oriented programming? Webopedia definition
Can a varargs method be overloaded?
Which method cannot be overridden?
What is difference between inheritance and polymorphism?
What is constructor in oop?
What is abstraction encapsulation?
Which is not an object oriented programming language?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What are functions in oop?
what is the sylabus for priliminaries?
What is encapsulation and abstraction? How are they implemented in C++?
Why do we use oops?
What is coupling in oop?
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?
What is the use of oops?