#include <stdio.h>
#include <string.h>

int main(){

char name[25];
int numname = 0;
char *ret;

printf("Enter a series of names and type 'end' to stop:\n");

do
{

	scanf("%[^\n]", name );
   getchar();
   ret = strchr(name,' ');

	while (strlen(name) > 25 || ret != NULL) //Check if the name exceeds 25 characters.
	{
		printf("Name must not exceed 25 characters or contain blank characters:\n");
		printf("Enter a name again: \n");
		scanf("%[^\n]", name );
   	getchar();
      ret = strchr(name,' ');
	}

	if (strlen(name) > 10) //Check if the name is more than 10 characters and count it.
		numname++;
}
while (strcmp(name,"end") != 0); //If name is 'end' then stop the program.

printf("The number of names containing more than 10 characters is %d.",numname);
return 0;
}