文章
71
粉丝
142
获赞
5
访问
53.0k
#include<iostream>
#include<string>
#include<cstring>
using namespace std;
int a[105] = { 0 };
int main() {
string str;
getline(cin,str);
for (int i = 0; i < str.size();i++) {
if (str[i]>='0'&&str[i]<='9') {
a[i] = 1;
}
}
for (int i = 0; i < str.size();i++) {
if (a[i]==0) {
cout << str[i];
}
}
for (int i = 0; i < str.size(); i++) {
if (a[i] == 1) {
cout << str[i];
}
&nb...
登录后发布评论
暂无评论,来抢沙发