As the manager of a movie theater, you are looking for ways to speed up taking inventory at the end of each week. You will write a program to track the following items:
At the end of each week, you want to enter how many of each item you have, and your program will calculate how many of each item you need to order given you want 1000 of each at the start of the week.
The input will be formatted as a space-separated list of numbers representing the number of cups, candy bars, bags of popcorn, and bottles of water remaining. For example:
Input
368 453 231 576
Would mean you have 368 cups, 453 candy bars, 231 bags of popcorn, and 576 bottles of water. Your program should then calculate:
So, given our previous input, the following output would be expected:
Output
You need to buy 632 cups, 547 candy bars, 769 bags of popcorn, and 424 bottles of water
This will cost 561 dollars and 50 cents
On average you sold 90.285714 cups, 78.142857 candy bars, 109.857143 bags of popcorn, and 60.571429 bottles of water per day
You do not need to worry about handling plural vs. singular forms of the words in the output. For example, outputting 1 cups is acceptable and expected.
There are 10 test cases, each worth 10 points, for a total of 100 points. Each test case has three parts, testing for the output pertaining to:
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
30 | 31 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 1 | 2 | 3 |
Get Free Quote!
335 Experts Online