s[i]=getchar())=='stop'
stop是字符串,怎么可能和字符相等呢
#include <stdio.h>
#include <string.h>
int main()
{
char word[30];
int count = 0;
scanf("%s",word);
while(strcmp(word,"stop") != 0)
{
count++;
scanf("%s",word);
}
printf("单词数量:%d\n",count);
}
https://ask.csdn.net/questions/7830575?answer=53977771&username=Z65443344&utm_medium=notify.im.haveAccept.a
你这代码写的毫无逻辑可言
'stop'又是啥,一个字符里能放下4个字符?