文章
211
粉丝
1
获赞
1181
访问
83.3k
#include<bits/stdc++.h>
using namespace std;
int main(){
string str;
getline(cin,str);
int alpha=0,digit=0,blank=0,other=0;
for(char c:str){
if(isalpha(c))
alpha++;
else if(isdigit(c))
digit++;
else if(c == ' ')
blank++;
else
other++;
}
cout << alpha << " " << digit << " " << blank << " " << other;
return 0;
}
登录后发布评论
暂无评论,来抢沙发