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 the size of an empty class

12 Answers   Wipro,


what is the difference between <stdio.h>and "stdio.h"?

5 Answers  


What is abstraction example?

0 Answers  


What is the purpose of enum?

0 Answers  


What is polymorphism what are the different types of polymorphism?

0 Answers  






What is polymorphism? Explain with an example.

48 Answers  


What is virtual destructor? Why?

3 Answers   Agile Software, College School Exams Tests, CSC,


What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance?

4 Answers   Accenture, L&T,


what are abstract classes and how they impliment , with example

2 Answers  


What is difference between pop and oop?

0 Answers  


What is design patterns in C++?

2 Answers   Persistent,


Write a program to demonstrate the use of 'Composition' in C++

2 Answers  


Categories