View Code of Problem 84

#include <iostream>
using namespace std;
int main(){
	string s,salt="salt";
	while(getline(cin,s)){
		string t=s;
		for(int i=0;i<s.length();i++){
			if(s[i]>='A'&&s[i]<='Z')
				s[i]+=32;
		}
		if(s.find(salt)!=-1)
			cout<<t<<endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 84