#include <iostream> #include <cstdio> using namespace std; int main(){ char a[999]; while(cin.getline(a,999)){ for(int i=0;a[i]!='\0';i++){ for(int j=0;a[j]!='\0';j++){ if((a[j]=='s'||a[j]=='S')&&(a[j+1]=='a'||a[j+1]=='A')&&(a[j+2]=='l'||a[j+2]=='L')&&(a[j+3]=='t'||a[j+3]=='T')){ cout<<a[i]; } } } cout<<endl; } return 0; } |
Double click to view unformatted code.