Question: code the following problem using C++ A . Write a program which reads words from /usr/share/dict/words, the dictionary on build.tamu.edu, into a vector of strings,

code the following problem using C++

A. Write a program which reads words from /usr/share/dict/words, the dictionary on build.tamu.edu, into a vector of strings, then counts how many words have a vowel [aeiou] in a given position. program must include at least the exception-handling framework

A sample run should look like this:

Which letter postion? 4 137266 words in the dictionary have a vowel [aeiou] in position 4

Which letter postion? 15 3676 words in the dictionary have a vowel [aeiou] in position 15

Note: Be sure to ignore case, that is, count upper or lower case vowels. "Position 1" means the first letter, "Position 2" means the second letter, etc.

B.

Modify problem A to ask for both a letter position and a list of letters, e.g., Which letter postion? 4 Which letters? qwe There are 44192 words which have one of the letters [qwe] in position 4. Which letter postion? 4 Which letters? aeiou There are 137266 words which have one of the letters [aeiou] in position 4. (That second example should give the same answer as problem A.) Do not read the words into a vector; just check each word as you read it from the disk file. (This program would help in solving crossword puzzles!) 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!