返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     char f[4]="Ian";
  7.     char f2[3]={'I','a','n'};
  8.     string f3[2]={"Ia","n"};
  9.     string f4="Ian";
  10.     int a=3;
  11.     char c='X';
  12.     cout<<f<<endl;
  13.     for(int i=0;i<4;i++)
  14.     cout<<f2[i];
  15.      cout<<endl;
  16.     for(int i=0;i<2;i++)
  17.     cout<<f3[i];
  18.      cout<<endl;
  19.    
  20.     cout<<f4<<endl;
  21.     cout<<a<<endl;
  22.     cout<<c<<endl;  
  23.    
  24.     system("pause");
  25.     return 0;   
  26. }
複製代碼

TOP

返回列表