[求助]读取单词怎么输入后不能回到原界面
代码如下:#include<stdio.h>
void main()
{ int i=0,num=0;
char c, str[80];
printf("input str:");
gets(str);
while (gets(str)!='\0')
{while (gets(str)==' ' )
i++;
while(gets(str)!=' '&&gets(str)!='\0')
i++;
num++; }
printf("there are %d words in the line.",num);
}