8.33 LAB: Thesaurus Given a set of text files containing synonyms for differentwords, complete the program to
Question:
8.33 LAB: Thesaurus
Given a set of text files containing synonyms for differentwords, complete the program to output the synonyms for a specificword. Each text file contains synonyms for the word specified inthe file?s name, and each row within the file lists the word?ssynonyms that begin with the same letter, separated by a space.
The program should read a word and a letter from the user andopen the text file associated with the input word. The program thenshould output all the synonyms that begin with the input letter,one synonym per line. If no synonyms that begin with the inputletter are found, the program should output a message indicatingso.
Ex: If the input of the program is:
educate c
the program opens the file educate.txt, which contains:
brainwash briefcivilize coach cultivatedevelop discipline drilledify enlighten exercise explainfosterimprove indoctrinate inform instructmaturenurturerearschooltrain
then the program outputs:
civilizecoachcultivate
Ex: If the input of the program is:
educate a
then the program outputs:
No synonyms for educate begin with a.
#include #include using namespace std;
int main() {
/* Type your code here. */
return 0;}