文章
71
粉丝
142
获赞
5
访问
50.7k
#include<iostream>
#include<cstring>
#include<string>
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]>='A'&&str[i]<='Z')|| (str[i] >= 'a' && str[i] <= 'z')) {
a[i] = 1;
}
else if (str[i]>='0'&&str[i]<='9') {
a[i] = 2;
}
}
for (int i = 0; i < str.size();i++) {
if (a[i]==1) {
cout << str[i];
...
登录后发布评论
暂无评论,来抢沙发