返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     string str, s1, s2;
  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. }
複製代碼

TOP

返回列表