文章
61
粉丝
137
获赞
18
访问
38.4k
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
string number;
string alph;
string other;
cin >> s;
int len = s.length();
for(int i = 0; i < len; i++){
if(s[i] <= 'Z' && s[i] >= 'A')
alph.push_back(s[i]);
else if(s[i] <= 'z' && s[i] >= 'a')
alph.push_back(s[i]);
else if(s[i] <= '9' && s[i] >= '0')
number.push_back(s[i]);
else
other.push_back(s[i]);
}
cout << alph << endl;
cout << number << endl;
cout << other << endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发