You are on page 1of 1

Brands Adidas Nike Reebok

Price/Item 150 200 250

Discount 5% for each pair 10% for every 2 pairs 15% for every 3 pairs

Sample test case: (sample inputs/outputs) Menu: 1. Adidas 2. Nike 3. Reebok 4. Exit/End the program Select your brand: 2 How many pairs: 3 method a: find (how many groups of 2 x 200 x 2 - 10%) + (remaining x 200) =(1 x 200 x 2 x 0.9) + (1 x 200) =360 + 200 =560 method b: find (how many pairs x price) - (10% for every 2 pairs x 200) =(3 x 200) - (0.1 x 1 x 2 x 200) =600 - 40 =560 You have to pay RM560.00.

You might also like