Answered step by step
Verified Expert Solution
Question
1 Approved Answer
There is a coffee shop in which customers come and buy coffee during the day. The owner of the shop wants to calculate the
There is a coffee shop in which customers come and buy coffee during the day. The owner of the shop wants to calculate the average time between two consecutive (i.e., arka arkaya gelen) customers coming to the shop. Write a program that reads the number of customers arriving during the day as an int value (customerCount) and the times these customers arrive to the coffee shop as a sequence of int values in minutes (e.g., 610 means the customer arrives to the shop at 10:10 in the morning). This sequence will ALWAYS be given in chronological (i.e., zamana gre sralanm) order. Then, the program will calculate the average time between any two consecutive customers arriving to the shop and print it out as a double value. NOTE: The number of customers can be at most 50. NOTE: The number of customers cannot be less than 2. NOTE: You MUST use at least one for or while statement in this question. 728 116 140 142 8480 510 540 570 600 61200 1220 1300 1340 1350 Input 185 200 202 Output 29 630 660 720 34.2857 1360 32
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