View Code of Problem 84

#include<bits/stdc++.h>
using namespace std;
int main(){
	char s[10000];
	int i;
	while(gets(s)!=NULL){
		for(i=0;i<strlen(s);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')){
			puts(s);
		}
	}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 84