#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语言程序设计教程(第三版)课后习题11.8 (C语言代码)浏览:779 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:542 |
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)浏览:594 |
【亲和数】 (C语言代码)浏览:529 |
C语言程序设计教程(第三版)课后习题9.1 (Java代码)浏览:465 |
【出圈】 (C语言代码)浏览:788 |
蛇行矩阵 (C语言代码)浏览:728 |
C语言训练-求PI* (C语言代码)浏览:609 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:468 |
WU-字符串比较 (C++代码)浏览:741 |