int main()
{
char line[100];
int wordcounter=0,i=0,flag=0;
freopen("in.txt","r",stdin);
while(gets(line)!=NULL)
{
while(line[i])
{
if((line[i]>='A' && line[i]<='Z')||(line[i]>='a' && line[i]<='z'))
flag=1;
else
{
if(flag)
wordcounter++;
flag=0;
}
i++;
}
printf("%d\n",wordcounter);
wordcounter=i=flag=0;
}
return(0);
}
Hello my friend! I have been visiting your blog. Cool! Congratulations for your work. I invite you to visit my blog at:
ReplyDeletehttp://nelsonsouzza.blogspot.com
I hope you all have a great evening!