Question: Write a program that reads a character, then reads in a list of words. The output of the program is every word in the list
Write a program that reads a character, then reads in a list of words. The
output of the program is every word in the list that contains the character at
least once. Assume at least one word in the list will contain the given character.
The Challenge
create a set called 'charSet'
charSet contains az and AZ
prompt for a char
validate the char entered against charSet
validate the char entered length
prompt for a list of words
print a list of words delimited with a that have the char in them
Input
prompt for a char
prompt for a list of words
Output
a list of words with the char in them
an error message, if the char is snot valid
Example
Enter a character:
Enter a list of words: Zoo zookeeper Zonk Mazzu
Zoo,Zonk,
Enter a character: Toolong
Invalid Character!
Enter a character:
Invalid Character!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
