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.
1 The Challenge
create a set called 'charSet'
charSet contains a..z and A..Z
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
2 Input
prompt for a char
prompt for a list of words
3 Output
a list of words with the char in them
an error message, if the char is snot valid
4 Example
Enter a character: Z
Enter a list of words: Zoo zookeeper Zonk Mazzu
Zoo,Zonk,
Enter a character: Toolong
Invalid Character!
Enter a character: *
Invalid Character!
 Write a program that reads a character, then reads in a

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!