返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. string str,s1,s2;
  4. int main()
  5. {
  6.     getline(cin,str);
  7.     for(char c:str)
  8.     {
  9.         if(c>='A'&&c<='Z')
  10.             s1+=c;
  11.         else
  12.             s2+=c;
  13.     }
  14.     cout<<s1<<endl;
  15.     cout<<s2<<endl;
  16.     cout<<s1.length()<<endl;

  17.     return 0;
  18. }
複製代碼

TOP

返回列表