文章
105
粉丝
69
获赞
117
访问
56.9k
#include<bits/stdc++.h>
using namespace std;
int main()
{
string str;
getline(cin, str);
string num, c, others;
for(int i = 0; i < str.size(); i ++)
{
if(str[i] >= '0' && str[i] <= '9')
num += str[i];
else if(str[i] >= 'A' && str[i] <= 'Z' || str[i] >= 'a' && str[i] <= 'z')
c += str[i];
else
others += str[i];
}
cout << c << endl;
cout << num << endl;
cout << others;
return 0;
}
登录后发布评论
暂无评论,来抢沙发