Mini Quiz Version 2

Write a program that calculates the total cost of candy for Halloween taking in account that discount is given based on the number of pounds user purchased. See disount rule in the table below.

Discount Rule

Number of pounds Discount percent
0 - 5 pounds no discount
6 - 10 10% discount
11 and above pounds 20% discount

Write a program that first reads one integer - the number of people that purchased candy in the store on specific day.

For each person, the program reads the number of pounds (integer) and price per pound (float). The program finds the total cost paid by all customers on that day. In addition, the program finds the number of people who got 10% discount, the number of people who got 20% disount, the number of people who didn't receive any discount, and the average discount rate.