文章插图
#include#include using namespace std;int main() { char ch = '`'; int num = 0,let = 0,spa = 0,oth = 0; scanf ("%c",&ch); while (ch!=(char)10) { if (ch>='0' && ch<='9') num++; else if (ch>='A' && ch<='Z') let++; else if (ch>='a' && ch<='z') let++; else if (ch==' ') spa++; else oth++; scanf ("%c",&ch); } printf ("letters=%d\n",let); printf ("numbers=%d\n",num); printf ("space=%d\n",spa); printf ("others=%d\n",oth); system ("pause"); return 0;}
【字符分析统计】
推荐阅读
- 凉皮蒸出来碎了怎么回事 凉皮蒸出来碎了的原因分析
- 茶树冷胁迫诱导H1-histone基因的克隆与序列分析
- 个人所得税不报税有什么影响 抗缴个人所得税的后果分析
- 一个油茶金属硫蛋白基因的克隆与序列分析
- 职场新人应注意的职场案例 一个关于职场新人的职场案例分析一览
- 茶叶红外光谱的测量条件研究
- 茶叶定性和定量近红外光谱分析方法研究
- 沙美特罗替卡松粉剂治疗慢性阻塞性肺疾病33例分析
- 云南大理茶资源遗传多样性的AFLP分析
- 茶叶中EGCG3″Me的分析方法研究