View Code of Problem 84

#include<bits/stdc++.h>
using namespace std;
int main(){
	string s;
	int i;
	while(getline(cin,s)){
		for(i=0;s[i]!='\0';i++){
		if((s[i]=='s'||s[i]=='S')&&(s[i+1]=='a'||s[i+1]=='A')
			&&(s[i=2]=='l'||s[i=2]=='L')&&(s[i+3]=='t'||s[i+3]=='T')){
			cout<<s<<endl;
		}
	}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 84