#include<stdio.h> int main() { int c, space ,number ,character , other; space = number = character = other =0; while( (c = getchar())!='\n') { if( c == ' ') { space++; } else if( c >='0'&& c <='9') { number++; } else if ( (c >='a' && c <= 'z') || ( c >= 'A' && c <= 'Z') ) { character++; } else { other++; } } printf("%d %d %d %d",character,space,number,other); return 0; }
0.0分
7 人评分
IP判断 (C语言描述,蓝桥杯)浏览:1092 |
母牛的故事 (C语言代码)浏览:549 |
Cylinder (C语言描述+详细分析)浏览:3255 |
1024题解浏览:803 |
C语言程序设计教程(第三版)课后习题10.1 (C语言代码)浏览:530 |
C二级辅导-分段函数 (C语言代码)浏览:593 |
C语言程序设计教程(第三版)课后习题12.2 (C语言代码)浏览:753 |
简单的a+b (C语言代码)浏览:818 |
母牛的故事 (C语言代码)浏览:560 |
神奇的fans (C语言代码)浏览:970 |