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

TOP

返回列表