返回列表 發帖
本帖最後由 tonyh 於 2020-11-21 20:55 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     re:
  7.     system("cls");
  8.     int score[5][3]={{90,85,85},
  9.                      {70,75,80},
  10.                      {80,95,80},
  11.                      {70,95,75},
  12.                      {87,38,80}};
  13.     cout<<"座號\t國文\t英文\t數學"<<endl;  
  14.     cout<<"============================"<<endl;
  15.     for(int i=0; i<5; i++)
  16.     {
  17.         cout<<i+1<<"\t";
  18.         for(int j=0; j<3; j++)         
  19.              cout<<score[i][j]<<"\t";
  20.         cout<<endl;   
  21.     }
  22.     system("pause");
  23.     goto re;              
  24.     system("pause");
  25.     return 0;   
  26. }
複製代碼

TOP

返回列表