“`”

【参考答案】

<pre><code>#include <stdio.h>
main()
{
char str i ng[81];
int i,num=0,word=0;
char c;
gets(string);
for(i=0;(c=string[i])!='\0';i++)
if(c==' ')
word=0;
else if(word==0)
{
word=1; num++; }
printf(""There are %d word s in the line\n"",num);
}
</code></pre>

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.