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

Prepare me a program for the animation of train

2234


Why is polymorphism needed?

809


Which method cannot be overridden?

781


What is coupling in oop?

794


How oops is better than procedural?

844


How long to learn object oriented programming?

838


What are the two different types of polymorphism?

915


What is the real time example of inheritance?

881


what's the basic's in dot net

1947


When not to use object oriented programming?

798


What is variable example?

808


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2149


What is constructor overloading in oop?

887


what is different between oops and c++

2210


What is the purpose of enum?

789