返回列表 發帖
本帖最後由 陳品肇 於 2019-1-26 14:30 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     char a[7]="cheney";
  7.     char b[6]={'c','h','e','n','e','y'};
  8.     string c[2]={"che","ney"};
  9.     string d="cheney";
  10.     int e=3;
  11.     char f='p';
  12.    
  13.     cout<<a<<endl;
  14.     for(int i=0;i<=5;i++)
  15.     {cout<<b[i];
  16.     }
  17.     cout<<endl;
  18.     cout<<c[0]<<c[1]<<endl;
  19.     cout<<d<<endl;
  20.     cout<<e<<endl;
  21.     cout<<f<<endl;
  22.    
  23.     system("pause");   
  24.     return 0;
  25. }
複製代碼

TOP

返回列表