1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Agata [3.3K]
3 years ago
7

You will be given a grocery list, followed by a sequence of items that have already been purchased. You are going to determine w

hich items remain on the the list and output them so that you know what to buy.
You will be give an integer n that describes how many items are on the original grocery list. Following that, you will be given a list of n grocery list items (strings) that you need to buy. After your grocery list is complete, you will receive a list of items that had already been purchased. For each of these items, if it matches any item on your grocery list, you can mark that item as purchased. You will know that you are at the end of the list of items already purchased when you receive the string "DONE".

At that point, you will output a list of items left to buy (each item on its own line).

Write the body of the program.

Details

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.

Computers and Technology
1 answer:
Leokris [45]3 years ago
8 0

Answer:

Following is attached the code as well as the output according to the requirements. I hope it will help you!

Explanation:

You might be interested in
Rick needs to find the lowest number in a set of numbers that includes decimals. Which statistical function in a spreadsheet wil
professor190 [17]
Umm

I’m in 10th grade so.....what is a spreadsheet and statistical function
4 0
3 years ago
Read 2 more answers
Which of these about non-disclosure agreements is accurate?
grandymaker [24]

Answer: number 2

Explanation: number 2

6 0
3 years ago
Read 2 more answers
A linear gradient can be positioned from left to right, top to bottom, or on any angle?
Harman [31]

from left to right because it is used more in expressions

3 0
3 years ago
How can ICTs be used in the workplace to improve the way employees
nadezda [96]

Answer:

it allows them to work more efficiently, with fewer waisted resources

Explanation:

3 0
3 years ago
Which item below is NOT output? A. monitor B. speakers C. printer D. mouse
Molodets [167]
D. mouse that is  your answer <span />
6 0
4 years ago
Read 2 more answers
Other questions:
  • Any parameter that receives a value and also sends a value outside the function must be declared as a reference parameter.
    8·1 answer
  • What is the process of copying items from ram to a storage device?
    8·1 answer
  • Write a function called median, that takes as parameter a full, sorted array of doubles and returns the median of the list. For
    15·1 answer
  • How do Web browsers interact with URL/URIs to navigate the internet
    14·1 answer
  • Hello everyone. I need help. C programming. Create at least two more functions except the main () function to collect them.
    5·1 answer
  • A mail merge data source must contain
    15·1 answer
  • What are the steps to open the Custom AutoFilter dialog box?
    5·2 answers
  • H e l p ASAP plz <br> and thanks
    9·1 answer
  • The specific instructions that a computing device needs to boot up and control the hardware
    12·1 answer
  • What is technology?5points​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!