返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a[5][3]={{43,55,77},
  7.                  {76,77,43},
  8.                  {78,11,22},
  9.                  {43,89,88},
  10.                  {98,44,67}};
  11.     string b[5]={"王大明","李大頭","蘇小安","余美美","張醜醜"};
  12.     cout<<"座號\t姓名\t國文\t英文\t數學"<<endl;
  13.     cout<<"====================================="<<endl;
  14.    
  15.    
  16.        
  17.         for(int i=0;i<=4;i++)
  18.         {
  19.         cout<<i+1<<"\t";
  20.         cout<<b[i]<<"\t";

  21.         for(int j=0;j<=2;j++)
  22.                 {
  23.                 cout<<a[i][j]<<"\t";
  24.         }
  25.         
  26.                 cout<<endl;
  27.     }
  28.     system("pause");
  29.     return 0;
  30. }
複製代碼

TOP

返回列表