文章
8
粉丝
49
获赞
1
访问
4.0k
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
char a[105]={0};
char b[105]={0};
char c[105]={0};
int j=0,k=0,l=0;
for(int i=0;i<s.size();i++){
if(('a'<=s[i]&&s[i]<='z')||('A'<=s[i]&&s[i]<='Z'))
a[j++]=s[i];
else if('0'<=s[i]&&s[i]<='9')
b[k++]=s[i];
else
c[l++]=s[i];
}
for(int i=0;i<=j;i++)
cout<<a[i];
cout<<endl;
...
登录后发布评论
暂无评论,来抢沙发