Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement a c++ program that solves Spelling Bee using standard library string class functions. The NY Times has a puzzle called Spelling Bee. This gives

Implement a c++ program that solves Spelling Bee using standard library string class functions.

The NY Times has a puzzle called Spelling Bee. This gives you 7 letters from which you construct words of at least 4 letters. A letter can be used more than once in a word. One of the seven letters is special and must appear in every word you construct. The special letter is the center letter in the flower graphic.

Prompt the user to enter 7 letters. The special required letter must be first. The letters must all be lowercase (the program doesn’t need to verify this).

The application must use the following words file as the list of words to search for words meeting the criteria:

http://www.cs.duke.edu/~ola/ap/linuxwords

Read words one at a time from the words file. If a word meets the criteria, display the word on the console and increment the number of words found. When the program reaches the end of the file, display the number of words found. The criteria are:

1. The word must contain at least 4 letters

2. It must contain only letters from the set of 7 input by the user

3. It must contain the special letter, the first of the 7

Constraints

The letters entered by the user must be all lower case.

Sample Input/Output


Enter letters (required letter first): tiencfv

cent

cite

civet

effect

effective

efficient

entice

event

evict

feet

fifteen

finite

incentive

incite

ineffective (Pangram)

inefficient

infect

infective (Pangram)

infinite

infinitive

intent

invective

invent

inventive

invite

nineteen

teen

tent

tint

vent

Found 30 words


Step by Step Solution

3.39 Rating (146 Votes )

There are 3 Steps involved in it

Step: 1

include include include include include include include include using namespace std int const MINWOR... 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

Personal Finance

Authors: Jeff Madura

5th edition

132994348, 978-0132994347

More Books

Students also viewed these Accounting questions

Question

14. Let X be uniform over (0, 1). Find E[X|X Answered: 1 week ago

Answered: 1 week ago