Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Input The program reads the following: an integer, n , defining the length of the original grocery list n strings that make up the grocery
Input
The program reads the following:
an integer, n defining the length of the original grocery list
n strings that make up the grocery list
a list of items that had already been purchased strings
the string "DONE", marking the end of all required input
Processing
Determine which items on the grocery list have already been purchased.
Output
Output the items from the grocery list that remain to be purchased ie all items from the original n grocery items that were not included in the list of items already purchased Each grocery item must be printed on its own line. The text must be terminated by a newline character.
Sample inputoutput:
Sample input Sample output
apples bananas carrots eggplant carrots DONE
apples
bananas
eggplantwrite a progrsam for this in java
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