#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语言代码)浏览:1173 |
C语言程序设计教程(第三版)课后习题9.10 (C语言代码)浏览:601 |
C语言程序设计教程(第三版)课后习题8.9 (C语言代码) 用函数传参的方法浏览:4064 |
C语言程序设计教程(第三版)课后习题7.1 (C语言代码)浏览:724 |
C语言程序设计教程(第三版)课后习题11.1 (C语言代码)浏览:676 |
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)浏览:563 |
C语言程序设计教程(第三版)课后习题4.9 (C语言代码)浏览:625 |
数字游戏 (C++代码)浏览:1178 |
小九九 (C语言描述,不看要求真坑爹)浏览:984 |
IP判断 (C语言代码)浏览:533 |