热门

最新

红包

立Flag

投票

同城

我的

发布
qq_55201195
求学若渴
5 年前
trueqq_55201195

为啥这结果是256?

CSDN App 扫码分享
分享
4
点赞
打赏
  • 复制链接
  • 举报
下一条:
练习3-4统计字符#include<stdio.h>int main(){ int letter,blank,digit,other; char ch; int i; letter=blank=digit=other=0; for(i=1;i<=10;i++) {ch= getchar(); if(ch>='A'&&ch<='z') letter++; else if(ch==' '||ch=='\n') blank++; else if(ch>='0'&&ch<='9') digit++; else other++; } printf(" letter=%d blank=%d digit=%d other=%d",letter,blank,digit, other); return 0;}
立即登录