返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     char n1[5]="tony";
  7.     cout<<n1<<endl;
  8.     char n2[4]={'t','o','n','y'};
  9.     for(int i=0;i<4;i++)
  10.     cout<<n2[i];
  11.     cout<<endl;
  12.     string n3[2]={"to","ny"};
  13.     for(int i=0;i<2;i++)
  14.     cout<<n3[i];
  15.     cout<<endl;
  16.     string n4="tony";
  17.     cout<<n4<<endl;
  18.     system("pause");
  19.     return 0;   
  20. }
複製代碼

TOP

返回列表