#define _CRT_SECURE_NO_WARNINGS #include #include int main() { char s1[1001]; int count = 0; scanf("%[^\n]s", s1); char* ptr = strtok(s1, " .,"); while (ptr != NULL) { ptr = strtok(NULL, " .,"); if (ptr != NULL && strcmp(ptr, "the") == 0) count++; } printf("%d", count); return 0; }