口袋妖怪火红性格自大:编写函数count(s),该函数的功能是:统计字符串中英文小写字母的个数。~~~~做个实验报告!
来源:百度文库 编辑:高考问答 时间:2024/05/11 16:43:51
兄弟们!帮帮忙~~~~~~~~~
过两天就要交了!拜托了~~~~
过两天就要交了!拜托了~~~~
#include <ctype.h>
int count(char *s)
{
int i = 0;
if (NULL==s) return 0;
while(*s)
{
if (islower(*s++)) i++;
}
return i;
}