返回列表 發帖
本帖最後由 洪藜芸 於 2019-9-21 11:09 編輯
  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]={{68,43,65},{85,62,73},{95,100,98},{86,71,88},{88,77,96}};
  9.    
  10.     for(int i=0;i<5;i++)
  11.     {
  12.         cout<<i+1<<"\t";
  13.         for(int s=0;s<3;s++)
  14.         {
  15.             cout<<a[i][s]<<"\t";
  16.         }  
  17.         cout<<endl;
  18.     }
  19.    
  20.     system("pause");
  21.     return 0;
  22. }
複製代碼

TOP

返回列表