怎么样编写调用函数?

img

img


我哪里错了?

题目要求统计的是单词的个数,不是字母的个数

int fun (char *s)
{
    int count = 0;
    while (*s) {
        if (*s >= 'a' && *s <= 'z') {
            do {
                s++;
            } while (*s && *s >= 'a' && *s <= 'z');
            count++;
        } else {
            s++;
        }
    }
    return count;
}

img