Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that asks user to input an index first, then asks the user to enter words and constructs a list of characters in
Write a program that asks user to input an index first, then asks the user to enter words and constructs a list of characters in each word under the index. If a word does not have the character under the given index then it will be skipped. The program must work exactly like the following example.
For example:
Input Result
x
xy
xyz
xyzt
xyztw
abcdef
blah
Q
Enter an index:
Enter a word or type Q to quit: x
Enter a word or type Q to quit: xy
Enter a word or type Q to quit: xyz
Enter a word or type Q to quit: xyzt
Enter a word or type Q to quit: xyztw
Enter a word or type Q to quit: abcdef
Enter a word or type Q to quit: blah
Enter a word or type Q to quit: Q
List of characters:
ttdh
frog
cat
dog
Q
Enter an index:
Enter a word or type Q to quit: frog
Enter a word or type Q to quit: cat
Enter a word or type Q to quit: dog
Enter a word or type Q to quit: Q
List of characters:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started