#include<stdio.h> int main() { char s[200]; gets(s); char *p; p = s; int cnt = 0, i; while (*p != '\0') { if (*p == ' ') { p++; continue; } else{ cnt++; i = 0; } while (*(p + i) != '\0'&&*(p + i) != ' ') i++; p = p + i; } printf("%d", cnt); return 0; }
06-13
634
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-27