- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int a[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 b=0;b<2;b++){
- for(int c=0;c<3;c++){
- for(int d=0;d<4;d++){
- cout<<"a"<<"["<<b<<"]"<<"["<<c<<"]"<<"["<<d<<"]"<<a[b][c][d]<<endl;
- }
- }
- }
- system("pause");
- return 0;
- }
複製代碼 |