You are to calculate weekly pay of T employees (1 ≤ T ≤ 1000) 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 (≤ 1000).
Line 2 : an integer denoting hours worked. (< 30000).
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 each employee's pay in dollars, rounded to two decimal places.
Point Value: 4
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 26, 2008
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3