Coding:-
#include<iostream.h>
void main()
{
int a[2][4];
int i,j;
cout<<"enter values in an array \n";
for(i=0;i<=1;i++)
{
for(j=0;j<=2;j++)
cin>>a[i][j];
}
cout<<"the array is : \n";
for(i=0;i<=1;i++)
{
for(j=0;j<=2;j++)
cout<<" "<<a[i][j];
cout<<"\n";
}
}
Output:-
No comments:
Post a Comment