返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     string subject[4]={"座號","國文","英文","數學"};
  7.     int point[5][3]={{90,85,85},
  8.                  {70,75,80},
  9.                  {80,95,80},
  10.                  {70,95,75},
  11.                  {80,85,95}};
  12.     for(int i=0; i<=3; i++)
  13.     {
  14.         cout<<subject[i]<<"\t";
  15.     }
  16.     cout<<endl;
  17.     cout<<"=============================="<<endl;
  18.     for(int j=0; j<=4; j++)
  19.     {
  20.         cout<<j+1<<"\t";
  21.         for(int k=0; k<=2; k++)
  22.         {
  23.              cout<<point[j][k]<<"\t";
  24.         }
  25.         cout<<endl;            
  26.     }
  27.     cout<<endl;
  28.     system("pause");
  29.     return 0;   
  30. }
複製代碼

TOP

返回列表