返回列表 發帖
  1. #include <iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int array[4][3][2] = { {{1,2},{3,4},{5,6}},
  7.         {{7,8},{9,10},{11,12}},{{13,14},{15,16},{17,18}},{{19,20},{21,22},{23,24}} };
  8.     for (int i = 0;i < 4;i++)
  9.     {
  10.         for (int e = 0;e < 3;e++)
  11.         {
  12.             for (int f = 0;f < 2;f++)
  13.             {
  14.                 cout << "[" << i << "][" << e << "][" << f << "] = " << array[i][e][f] << endl;;
  15.             }
  16.         }
  17.     }
  18.     cout << endl;
  19. };
複製代碼

TOP

返回列表