View Code of Problem 84

#include<stdio.h>
#include<string.h>
int main() 
{
	char a[1000];
	int l;
	while (gets(a) != NULL)
	{
		l=strlen(a);
		for (int i = 0; i<l; 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);
							break;
						}
					}
				}
			}
		}
	}
	return 0;
	
}

Double click to view unformatted code.


Back to problem 84