返回列表 發帖
本帖最後由 蔡少宇 於 2019-9-21 11:39 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     cout<<"座號\t國文\t數學\t英文"<<endl;
  7.     cout<<"==============================="<<endl;
  8.     int a[5][3]={{100,92,99},
  9.                 {98,95,96},
  10.                 {100,91,82},
  11.                 {99,94,96},
  12.                 {88,77,96}};
  13.                
  14.     for(int i=0;i<5;i++)
  15.     {
  16.         cout<<i+1<<"\t";
  17.         for(int s=0;s<3;s++)
  18.         {
  19.             cout<<a[i][s]<<"\t";
  20.         }  
  21.         cout<<endl;
  22.     }
  23.    
  24.     system("pause");
  25.     return 0;
  26. }
複製代碼

TOP

返回列表