返回列表 發帖
  1. #include <iostream>

  2. using namespace std;
  3. string str,b,s;
  4. int main()
  5. {
  6.     cin>>str;
  7.     for(char c : str)
  8.     {
  9.         if(c>='a')
  10.             s+=c;
  11.         else
  12.             b+=c;
  13.     }
  14.     cout <<b<< endl;
  15.     cout<<s<<endl;
  16.     cout<<b.size()<<endl;
  17.     return 0;
  18. }
複製代碼

TOP

返回列表