标签:oge eth you har NPU print inpu else word
#include <stdio.h>
int main(){
int word,num=0;
char ch;
printf("input your text:\n");
while((ch=getchar())!=‘\n‘)
if(ch==‘ ‘)
word=0;
else if(word==0){
word=1;
num++;
}
printf("there are %d words all together\n",num);
return 0;
}
标签:oge eth you har NPU print inpu else word
原文地址:https://www.cnblogs.com/p201821430005/p/10575632.html