Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions