#include<iostream.h>
#include<conio.h>
void main()
{
//clear the screen.
clrscr();
//declare variable type int
int a[3][3],i,j;
//Input the numbers
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cout<<"Enter number :";
cin>>a[i][j];
}
}
//display the matrix
for(i=2;i>=0;i--)
{
for(j=2;j>=0;j--)
{
cout<<a[i][j]<<"t";
}
cout<<endl;
}
//get character
getch();
}
Output
Enter the number
1
Enter the number
2
Enter the number
3
Enter the number
4
Enter the number
5
Enter the number
6
Enter the number
7
Enter the number
8
Enter the number
9
9 8 7
6 5 4
3 2 1