System Error
/in/foo.c: In function 'main': /in/foo.c:6:17: warning: unused variable 'word' [-Wunused-variable] int count=0,word=0; ^~~~
VJ4Error('ProblemDataNotFoundError', '题目 5af30b0cd3d8a103c03de4da 的数据未找到。', 'kechuang', '5af30b0cd3d8a103c03de4da')
代码
#include <stdio.h>
#include <stdlib.h>
int main()
{
char c;
int count=0,word=0;
c=getchar();
while(c!='\n')
{
if(c==' ')
count++;
c=getchar();
}
printf("有单词%d个",count+1);
return 0;
}