#include<stdio.h>
#include<assert.h>
int fun(const char* str)
{
assert(str != NULL);
const char* p = str;
int count = 0;//计数器
while(*p != '\0')
{
if(*p != ' ' && (*(p+1) == ' ' || *(p+1) == '\0'))
{
count ++;
}
p++;
}
retrun count;
}