Krispy Kreme is giving away one free donut for each customer today. They suspect that some customers are trying to get more than their fair share of donuts by lining up more than once. Try to find these greedy customers so that Krispy Kreme can give away the sweet, soft and glazed donuts to the rightful owners. Input 1. The number of customers Constraints The value is > 0. 2. The customers Constraints The value is within the range: 0 <= customer number <= 500. Output The first line will contain a message prompt to input the number of customers. The succeeding lines will contain message prompts to input the customers. The last line list down the customers that appeared more than once, in ascending order. Print "HONEST CUSTOMERS" if there are no duplicating customers. Enter·the·number·of·customers:·4 Customer·number:·5 Customer·number:·6 Customer·number:·6 Customer·number:·5 Duplicates:· Customer·#5 Customer·#6 (C++ CODE ONLY, SPACING MATTERS)
Krispy Kreme is giving away one free donut for each customer today. They suspect that some customers are trying to get more than their fair share of donuts by lining up more than once. Try to find these greedy customers so that Krispy Kreme can give away the sweet, soft and glazed donuts to the rightful owners.
Input
1. The number of customers
Constraints
The value is > 0.
2. The customers
Constraints
The value is within the range: 0 <= customer number <= 500.
Output
The first line will contain a message prompt to input the number of customers. The succeeding lines will contain message prompts to input the customers. The last line list down the customers that appeared more than once, in ascending order. Print "HONEST CUSTOMERS" if there are no duplicating customers.
Customer·number:·5
Customer·number:·6
Customer·number:·6
Customer·number:·5
Duplicates:·
Customer·#5
Customer·#6
(C++ CODE ONLY, SPACING MATTERS)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images