Words containing "the" substring: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add C) |
Not a robot (talk | contribs) (Add C++) |
||
Line 452: | Line 452: | ||
} |
} |
||
fclose(f); |
fclose(f); |
||
return 0; |
|||
}</lang> |
|||
{{out}} |
|||
<pre style="height:50ex;">authenticate |
|||
chemotherapy |
|||
chrysanthemum |
|||
clothesbrush |
|||
clotheshorse |
|||
eratosthenes |
|||
featherbedding |
|||
featherbrain |
|||
featherweight |
|||
gaithersburg |
|||
hydrothermal |
|||
lighthearted |
|||
mathematician |
|||
neurasthenic |
|||
nevertheless |
|||
northeastern |
|||
northernmost |
|||
otherworldly |
|||
parasympathetic |
|||
physiotherapist |
|||
physiotherapy |
|||
psychotherapeutic |
|||
psychotherapist |
|||
psychotherapy |
|||
radiotherapy |
|||
southeastern |
|||
southernmost |
|||
theoretician |
|||
weatherbeaten |
|||
weatherproof |
|||
weatherstrip |
|||
weatherstripping</pre> |
|||
=={{header|C++}}== |
|||
<lang cpp>#include <iostream> |
|||
#include <fstream> |
|||
int main() { |
|||
std::string word; |
|||
std::ifstream file("unixdict.txt"); |
|||
if (!file) { |
|||
std::cerr << "Cannot open unixdict.txt" << std::endl; |
|||
return -1; |
|||
} |
|||
while (file >> word) { |
|||
if (word.length() > 11 && word.find("the") != std::string::npos) |
|||
std::cout << word << std::endl; |
|||
} |
|||
return 0; |
return 0; |
||
}</lang> |
}</lang> |