返回列表 發帖
  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' and c<='Z')
  10.                         s1+=c;
  11.                 else
  12.                         s2+=c;
  13.         }
  14.         cout<<s1<<'\n'<<s2<<'\n'<<s1.length()<<'\n';
  15.         return 0;
  16. }
複製代碼

TOP

返回列表