#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main ()
{
char str[100];
int alpha=0,digit=0,space=0,other=0;
int n=100;
gets(str);
for(int i=0;i<strlen(str);i++){
if (isalpha(str[i]))
++alpha;
else if(isdigit(str[i]))
++digit;
else if(str[i]==32)
++space;
else
++other;
}
cout<<alpha<<" "<<digit<<" "<<space<<" "<<other<<endl;
return 0;
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题6.10 (C语言代码)浏览:552 |
简单的a+b (C语言代码)浏览:585 |
【求[X,Y]内被除3余1并且被除5余3的整数的和】 (C语言代码)浏览:672 |
C语言程序设计教程(第三版)课后习题1.6 (C语言代码)浏览:535 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:558 |
P1000 (C语言代码)浏览:867 |
Tom数 (C语言代码)浏览:492 |
蚂蚁感冒 (C语言代码)浏览:761 |
母牛的故事 (C语言代码)浏览:559 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:525 |