返回列表 發帖
本帖最後由 李宇澤 於 2019-11-29 20:58 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a[3][4]={{1,2,3,4},
  7.                  {5,6,7,8},
  8.                  {9,10,11,12}};
  9.     for(int x=0; x<3; x++)
  10.     {
  11.        for(int y=0; y<4; y++)
  12.        {
  13.             cout<<"a["<<x<<"]["<<y<<"]="<<a[x][y]<<endl;
  14.        }
  15.     }
  16.     system("pause");
  17.     return 0;
  18. }
複製代碼
李宇澤Oscar

TOP

返回列表