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

TOP

返回列表