In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of March 10th
(this exercise will still be available for submission after that deadline, but without couting towards your grade)
[to understand the context of this problem, you should read the class #02 exercise sheet]


[PII013] Buy Me Flowers

Sam Blossom sells flowers to other stores and to individual customers. For stores, they offer a discount plus tax exemption, but individual customers pay a 6% tax (and have no discounts).

The Problem

Write a program that calculates the final price of flowers based on the customer's type and the initial price. Note that:

Amount (Euros) Discount (%)
Lower than 50 2
Between 50 and 200 5
Over 200 10

Input

The input consists of two lines:

Output

The output should be a single line displaying the final price after applying the relevant discount or tax, rounded to two decimal places.

Constraints

The following limits are guaranteed in all the test cases that will be given to your program:

0 < P ≤ 500       Price of the flowers
1 ≤ C ≤ 2       Customer type

Example Input 1 Example Output 1
35.3
2
37.42

Example Input 2 Example Output 2
235
1
211.50

Programming II (CCINF1002)
DCC/FCUP - University of Porto