The list is empty. Prompt the user continuously until a sentinel value, ZZZ, is entered.
This is the question I am stuck on -
Write an application that accepts up to 20 Strings, or fewer if the user enters the terminating value ZZZ. Store each String in one of two lists—one list for short Strings that are 10 characters or fewer and another list for long Strings that are 11 characters or more. After data entry is complete, prompt the user to enter which type of String to display, and then output the correct list.
For this exercise, you can assume that if the user does not request the list of short strings, the user wants the list of long strings. If a requested list has no Strings, output The list is empty. Prompt the user continuously until a sentinel value, ZZZ, is entered.
This is the code I have tried to start with but I am honestly just confusing myself more-
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images