文章
105
粉丝
69
获赞
117
访问
56.8k
#include<bits/stdc++.h>
using namespace std;
string str;
int a, b, c, d;
int main()
{
getline(cin, str);
for(int i = 0; i < str.size(); i ++)
{
if(isalpha(str[i])) a ++;
else if(isalnum(str[i])) b ++;
else if(str[i] == ' ') c ++;
else d ++;
}
cout << a << " " << b << " " << c << " " << d << endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发