- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int n[2][3][4]={{{1,2,3,4},{5,6,7,8},{9,10,11,12}},{{13,14,15,16},{17,18,19,20},{21,22,23,24}}};
- for(int x=0;x<2;x++)
- {
- for(int y=0;y<3;y++)
- {
- for(int z=0;z<4;z++)
- {
- cout<<"n["<<x<<"]["<<y<<"]["<<z<<"]"<<n[x][y][z]<<endl;
- }
- }
- }
- system("pause");
- return 0;
- }
複製代碼 |