#include<stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { char s[100]; while(scanf("%[^\n]",s)!=EOF){ getchar(); for(int 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'){ printf("%s\n",s); } } } } } } return 0; } |
Double click to view unformatted code.