#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 人评分
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:677 |
P1002 (C语言代码)浏览:969 |
【绝对值排序】 (C语言代码)浏览:713 |
C语言程序设计教程(第三版)课后习题8.6 (C语言代码)浏览:529 |
简单的a+b (C语言代码)浏览:335 |
printf基础练习2 (有点不明白)浏览:836 |
C语言程序设计教程(第三版)课后习题9.10 (C语言代码)浏览:548 |
C语言训练-亲密数 (C语言代码)浏览:682 |
循环入门练习6 (C语言代码)浏览:952 |
2006年春浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:342 |