TJ
2025-01-05 14:41:01
发布于:广东
8阅读
0回复
0点赞
#include <iostream>
#include <cstring>
#include <algorithm>
#include <string>
using namespace std;
string s;
string a;
int l,d,o;
int main(){
getline(cin,s);
for(int i = s.size()-2;i >= 0;i--){
if(s[i] >= 'a' && s[i] <= 'z'){
l++;
}else if(s[i] >= '0' && s[i] <= '9'){
d++;
}else{
o++;
}
}
cout << "Letters=" << l << endl << "Digits=" << d << endl << "Others=" << o;
return 0;
}
全部评论 1
你就坐我旁边
2025-01-05 来自 广东
0qw h ykuhkurg esguweghorigdsoghdsohsdogh oedrhre
re
dr
f2025-01-05 来自 广东
0666盐都不盐了
2025-03-16 来自 广东
0
有帮助,赞一个