View Code of Problem 84

#include <iostream>
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	string s;
	while(getline(cin,s)){
		string temp=s;
		for(int i=0;i<s.size();i++){
			if(s[i]>='A'&&s[i]<='Z')	s[i]+='a'-'A';
		}
		if(s.find('salt')!=string::npos){
			cout<<temp<<endl;
		}
	}
}

Double click to view unformatted code.


Back to problem 84