#include
#include
int main()
{
char input[1000];
int number=0;
printf("Enter: ");
gets(input);
char *delim=" ";
char *p;
p=strtok(input,delim);
number++;
while((p=strtok(NULL,delim)))
{
number++;
}
printf("the word number is %d \n",number);
return 0;
}