返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main(){
  5.     int score[5][3]={{90,85,85},
  6.                     {90,86,86},
  7.                     {90,87,87},
  8.                     {90,88,88},
  9.                     {90,89,89}};
  10.     string n[5]={"王大明","李大頭","蘇小安","余美美","張醜醜"};
  11.     cout<<"座號\t姓名\t國文\t英文\t數學\t"<<endl;
  12.     cout<<"============================================"<<endl;
  13.     for(int i=0;i<5;i++)
  14.     {
  15.         cout<<i+1<<"\t";
  16.          cout<<n[i]<<"\t";
  17.         for(int j=0;j<3;j++){
  18.         cout<<score[i][j]<<"\t";
  19.         }
  20.         cout<<endl;
  21.     }
  22.     system("pause");
  23.     return 0;
  24. }
複製代碼

TOP

返回列表