1 #include<stdio.h> 2 int main(){ 3 int sb,ss,sn; 4 char ch; 5 for(sb=0,sn=0,ss=0;ch!='!';){ 6 scanf("%c",&ch); 7 if(ch>=48&&ch<=57){ 8 sn=sn+1; 9 } 10 if(ch>=65&&ch<=90){ 11 sb=sb+1; 12 } 13 if(ch>=97&&ch<=122){ 14 ss=ss+1; 15 } 16 17 } 18 if(ch=='!')printf("%d %d %d",sb,ss,sn); 19 return 0; 20 }
注意是ch!=‘!’
标签:ch,符号,int,ss,特定,sn,&&,sb,输入 From: https://www.cnblogs.com/LXYlxy666/p/16882987.html