View Code of Problem 84

#include <stdio.h>
#include <string.h>
int main()
{
	char str[1000];
	while (gets(str) != NULL)
	{
		for (int i = 0; i < strlen(str); i++)
			if ((str[i] == 'S' || str[i] == 's') && (str[i+1] == 'A' || str[i+1] == 'a') && (str[i+2] == 'L' || str[i+2] == 'l') && (str[i+3] == 'T' || str[i+3] == 't'))
				puts(str);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 84