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

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     string n[5][2]={{"1","0965-419349"},{"2","0954-545543"},{"3","0932-734829"},{"4","110"},{"5","0965-408949"}};
  7.     cout<<"name\t電話"<<endl;
  8.     cout<<"===================================="<<endl;
  9.     for(int i=0; i<5; i++)
  10.     {
  11.         for(int j=0; j<2; j++)
  12.         {
  13.           cout<<n[i][j]<<" "<<"\t";        
  14.         }
  15.          cout<<endl;      
  16.     }
  17.     system("pause");
  18.     return 0;   
  19. }
複製代碼

TOP

返回列表