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