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 overriding in oops?
Advantage and disadvantage of routing in telecom sector
What is destructor example?
what is difference between class template and template class?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
hi all..i want to know oops concepts clearly can any1 explain??
What are functions in oop?
What are properties in oop?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
What is abstract class in oops?
What is abstraction in oop with example?
What is purpose of inheritance?
What is multilevel inheritance?
Can static class have constructor?
What is inheritance in simple words?