#include<iostream.h>
#include<conio.h>
void main()
{
int a[3][3],i,j;
for(i=0;i<3;i++)
for(j=0;j<3;j++)
cin>>a[i][j];
cout<<"Printing";
for(j=0;j<3;j++)
{cout<<a[i][j]<<" ";}
cout<<"\n";
}
getch();
}
Output:
1 2 3 4 5 6 7 8 9
1 2 3
4 5 6
7 8 9
#include<conio.h>
void main()
{
int a[3][3],i,j;
for(i=0;i<3;i++)
for(j=0;j<3;j++)
cin>>a[i][j];
cout<<"Printing";
for(j=0;j<3;j++)
{cout<<a[i][j]<<" ";}
cout<<"\n";
}
getch();
}
Output:
1 2 3 4 5 6 7 8 9
1 2 3
4 5 6
7 8 9
No comments:
Post a Comment