Computer Science, asked by sathiskumarg2003, 18 hours ago

BILL DISCOUNT CALCULATOR

A Supermarket is running the following promotion
5% discount on books, food and drinks
20% discount on cloths
3% for all other items
Additional 20% discount on top discounted price for all clearance items

When I purchase items I receive a receipt which lists the name of all the items and their price after discount, finishing with the total cost of the items after discount, and the amount saved (discount amount).

1st line in the input will be the number of items in the shopping basket.

TEST INPUTS:
Question 1 Input:
4
1 book at 14.49
1 shirt at 19.99
1 chocolate bar at 1.00
1 clearance chocolate bar at 2.00

Question 2 Input:
4
1 bottle of perfume at 27.99
1 bottle of wine at 18.99
1 dress at 9.75
1 box of chocolates at 11.25

EXPECTED OUTPUT

For Question 1:
1 book at 13.77
1 shirt at 15.99
1 chocolate bar at 0.95
1 clearance chocolate bar at 1.52
Total: 32.23
You saved: 5.25

For Question 2:
1 bottle of perfume at 27.15
1 bottle of wine at 18.04
1 dress at 7.80
1 box of chocolates at 10.69
Total: 63.68
You saved: 4.30

Answers

Answered by arrowts
2

Answer:

just say Abra ca dabra Gili Gili chu

Mark Has Brainlist...

-ARROW TS...

Similar questions