View Code of Problem 84

#include <stdio.h>
#include <string.h>
#define N 100
int main()
{
	char a[N];
	while(gets(a) != NULL)
	{
		for(int i = 0; i < strlen(a); i++)
			if(a[i] == 's' || a[i] == 'S')
				if(a[i + 1] == 'a' || a[i + 1] == 'A')
					if(a[i + 2] == 'l' || a[i + 2] == 'L')
						if(a[i + 3] == 't' || a[i + 3] == 'T')
							printf("%s\n", a);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 84