c语言 输入一串字符串,统计并输出其中的大写字母、小写字母、数字字符、其它字符的个数。

日期:2019-05-20 11:59:59 人气:2

c语言 输入一串字符串,统计并输出其中的大写字母、小写字母、数字字符、其它字符的个数。

用指针编写程序 #include void main() { char a[100]; int sum0=0,suma=0,sumA=0; gets(a); char*p; for(p=a;*p!='\0';p++) { if(*p>='0'&&*p<='9') sum0+=1; else if(*p>='a'&&*p<='z') suma+=1; else if(*p>='A&#
    A+
热门评论