#include<stdio.h> #include <math.h> #include <string.h> #include <ctype.h> int main() { int i; char s[100]; while(gets(s)) { for(i=0;i+3<strlen(s);i++) { if(tolower(s[i])=='s'&&tolower(s[i+1])=='a' &&tolower(s[i+2])=='l'&&tolower(s[i+3])=='t') { puts(s); } } } return 0; } |
Double click to view unformatted code.