PROBLEM 8 : COMPUTE COOKIES SOLD
Students at a local middle school volunteered to sell fresh baked cookies to raise funds to
increase the number of computers for the computer lab. Each student reported
the number of boxes he/she sold.
Input
The first line of the input contains an integer N (1 ≤ N
≤ 5), the number of volunteers. Following the first lines are the test cases
which are; the name of each volunteer with the number of boxes that he/she had sold. The final line indicates the unit price for a
box of cookies.
Output
The report of the result will be the total number of
boxes of cookies sold, the unit price of the box, the
total revenue generated by selling the cookies, and the average number of boxes
sold by each student.
Sample Input
|
Sample Output
|
5
Sara 120
Lisa 128
Cindy 359
Nicole 267
Blair 165
3.5
|
1039
3.50
3636.50
207
|
Problem Setter : Umi Hanim Mazlan