## BlueBook - Pay

View as PDF

Points: 4
Time limit: 1.0s
Memory limit: 16M

Problem type
##### BlueBook

You are to calculate weekly pay of employees based on four factors: rate of pay in dollars, hours worked, tax category, and donations.

Any hours worked over 40 is considered "overtime" and is paid double.

The five tax categories are,

Tax Category Tax Deduction
A 0% Tax
B 10% tax
C 20% tax
D 29% tax
E 35% tax

#### Input Specification

Input starts with , followed by the information for employees on four separate lines. Each employee's information will be seperated with one newline.

Line 1: a real number denoting rate of hourly pay in dollars .
Line 2: an integer denoting hours worked. .
Line 3: a character denoting the tax category of how much tax the government collects.
Line 4: a y or n denoting whether they want to donate 10 dollars. Donations are calculated last.

#### Output Specification

Output each employee's pay in dollars, rounded to two decimal places.

#### Sample Input

2
1.0
4
A
n

1.0
41
B
y

#### Sample Output

4.00
27.80