返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {



  6.     string a[5][2]={{"大雄","0980-454666"},
  7.                      {"季安","0911-333898"},
  8.                      {"宜靜","0922-999579"},
  9.                      {"阿福","0938-234567"},
  10.                      {"小叮噹","0911-864356"}};
  11.     cout<<"姓名\t電話"<<endl;
  12.     cout<<"==========================="<<endl;

  13.     for(int i=0;i<=4;i++){
  14.             cout<<i+1<<"\t";

  15.         for(int j=0;j<=1;j++){

  16.             cout<<a[i][j]<<"\t";
  17.         }
  18.         cout<<endl;

  19.     }




  20.     system("pause");
  21.     return 0;
  22. }
複製代碼

TOP

返回列表