c语言题:输入一个字符串,统计其中大写字母,小写字母,数字,和其他字符的个数?
语法错误:
printf(“有%d个大写字母、%d个小写字母、%d个数字和%d个其他字符n”,dx,xx,shuzi,qita)
dx后面的逗号不是英语。算法中也有错误:判断时,if(all[i]>'a&;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;a[a][a]as[a[a]as[a[a[a]as[a[a[a]ltstdio。h>#include<ctype.h>intmain(){inti,a[5]chars[200]get(s)for(i=0s[i]i)if(isupper(s[i]))a[0]elseif(islower(s[i])a[1]
原文标题:c语言统计每个大写字母个数 C语言题:输入一个字符串,统计其中大写字母,小写字母,数字,和其他字符的个数?,如若转载,请注明出处:https://www.saibowen.com/tougao/18406.html
免责声明:此资讯系转载自合作媒体或互联网其它网站,「赛伯温」登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,文章内容仅供参考。