#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语言程序设计教程(第三版)课后习题9.4 (Java代码)浏览:1416 |
A+B for Input-Output Practice (C++代码)浏览:605 |
人见人爱A+B (C语言代码)浏览:625 |
printf基础练习2 (有点不明白)浏览:837 |
WU-输入输出格式练习 (C++代码)浏览:1076 |
母牛的故事 (C语言代码)浏览:1427 |
C语言程序设计教程(第三版)课后习题9.8 (C语言代码)浏览:664 |
罗列完美数 (C语言代码)浏览:491 |
C语言程序设计教程(第三版)课后习题9.8 (C语言代码)浏览:608 |
简单的事情 (C语言代码)浏览:633 |