You are to calculate weekly pay of ~T~ employees ~(1 \le T \le 1\,000)~ 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|
Input starts with ~T~, followed by the information for ~T~ 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 ~(\le
Line 2: an integer denoting hours worked. ~(< 30\,000)~.
Line 3: a character denoting the tax category of how much tax the government collects.
Line 4: a
n denoting whether they want to donate 10 dollars.
Donations are calculated last.
Output each employee's pay in dollars, rounded to two decimal places.
2 1.0 4 A n 1.0 41 B y