View Code of Problem 84

#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
	string s;
	while (getline(cin, s)) {
		string t = s;
		for (int i = 0; i < s.length(); i++) {
			s[i] = tolower(s[i]);
			
		}
		//cout << s.find("salt")<<endl;
		if (s.find("salt")<s.length())
			cout << t<<endl;
	}
	
	return 0;

}

Double click to view unformatted code.


Back to problem 84