#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 人评分
简洁的代码浏览:1428 |
C语言程序设计教程(第三版)课后习题7.3 (C语言代码)浏览:606 |
简单的a+b (C语言代码)浏览:650 |
C语言程序设计教程(第三版)课后习题6.6 (C++代码)浏览:637 |
C语言程序设计教程(第三版)课后习题6.1 (C语言代码)浏览:558 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:609 |
C语言程序设计教程(第三版)课后习题11.1 (C语言代码)浏览:496 |
时间转换 (C语言代码)浏览:649 |
第三届阿里中间件性能挑战赛-总决赛亚军比赛攻略浏览:1150 |
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)浏览:480 |