#include <stdio.h> #include <string.h> int main() { char s[1000]; while(gets(s)) { int n=strlen(s); for(int i=0;i<n;++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') { printf("%s\n",s); } } } } } } } |
Double click to view unformatted code.