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
Can static class have constructor?
How do you define social class?
What is a class and object?
Can you explain polymorphism?
What is the point of polymorphism?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What is oops with example?
What do you mean by Encapsulation?
What are the features of oop?
What are the benefits of interface?
What is the difference between a mixin and inheritance?
when to use 'mutable' keyword and when to use 'const cast' in c++
Why multiple inheritance is not allowed?
Write a program to reverse a string using recursive function?
Why it is called runtime polymorphism?