Saturday 25 February 2017

simplest multidimension array example

#include<iostream>
using namespace std;
#include<iomanip>
int main(){
int a[3][6]={{1,2,3,4,5,6},{7,8,9,10,11,12}};
for(int x=0;x<3;x++){
for(int y=0;y<6;y++){
cout<<setw(8)<<a[x][y];
}
cout<<endl;
}

}

No comments:

Post a Comment