返回列表 發帖
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;

  4. int main()
  5. {  
  6.        //32-space
  7.    string name("seeyoulater");
  8.     for(int i = 11;name.size()>=i; i--)
  9.      {        cout << name[i] ;    }  
  10.         system("pause");  
  11.         return 0;
  12. }
複製代碼
  1. (a)retaluoyees
複製代碼
張雅淳

TOP

  1. (b)later.see,you
複製代碼
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;

  4. int main()
  5. {  
  6.    string name("seeyoulater");

  7.       for(int i = 6; i < name.size(); i++)
  8.       {        cout << name[i] ;    }

  9.       cout << "," ;


  10.       for(int i = 0; i < name.size()-8; i++)
  11.       {        cout << name[i] ;    }
  12.            
  13.            
  14.       cout << "," ;
  15.    
  16.       for(int i = 3; i < name.size()-5; i++)
  17.       {        cout << name[i] ;    }
  18.      
  19.   system("pause");  
  20.         return 0;

  21. }
複製代碼
張雅淳

TOP

返回列表