#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 人评分
C语言程序设计教程(第三版)课后习题8.5 (C语言代码)浏览:583 |
简单的a+b (C语言代码)浏览:667 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:850 |
妹子杀手的故事 (C语言代码)浏览:1218 |
字符逆序 (C语言代码)浏览:609 |
母牛的故事 (C语言代码)浏览:940 |
C语言程序设计教程(第三版)课后习题10.3 (C语言代码)浏览:1909 |
C语言程序设计教程(第三版)课后习题12.3 (C语言代码)浏览:542 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:579 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:614 |