Question: 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 (i.e. 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 new-line character.
Sample input/output:
Sample input Sample output
4 apples bananas carrots eggplant carrots DONE
apples
bananas
eggplant

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!