#include<stdio.h> #include<string.h> void test(char s[]) { int i; for(i=0;i<strlen(s);i++) { if(s[i]=='s'||s[i]=='S') { if(s[i+1]=='a'||s[i+1]=='A') { if(s[i+2]=='l'||s[i+2]=='L') { if(s[i+3]=='t'||s[i+3]=='T') { puts(s); break; } } } } } } void main() { int i; char s[100]; while(gets(s)!=EOF) { test(s); } } |
Double click to view unformatted code.