返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.      string arr[5][2]={{"小明","0923-456-789"},
  7.                        {"小王","0983-945-536"},
  8.                        {"小張","0933-243-555"},
  9.                        {"小人","0977-525-656"},
  10.                        {"小影","09開頭的不告訴你"}};
  11.     cout<<"姓名     電話號碼"<<endl;     
  12.     cout<<"=========================="<<endl;
  13.     for(int i=0;i<5;i++)
  14.     {
  15.             for(int =j=0;j<2;j++)
  16.             {
  17.                  cout<<arr[i][j]<<"\t";
  18.             }
  19.             cout<<endl;
  20.     }
  21.     system("pause");
  22.     return 0;   
  23. }
複製代碼

TOP

返回列表