If elected president, Donald Trump plans to implement a system of four income tax brackets (full details can be found on his website here). Your job is to take two inputs, annual income and filing status (single, married, or head of household), and output the income tax that must be paid.
Income Tax Brackets
(We are only interested in the income tax rate; you can ignore the long-term capital gain rate).
Note that income taxes are computed using marginal rates — that is, you only pay the bracket rate for the portion that exceeds the bracket's minimum amount.
For example, a single filer making $45,000 a year would pay 0% on the first $25,000, and 10% on the $20,000 after that, for a total of $2,000 in taxes.
A married couple filing jointly for $500,000 would count 25% only on the amount exceeding $300,000, and add $45,000 to that to account for the income earned in lower brackets (which is 10% of $50,000 plus 20% of $200,000).
Input/Output
Input/Output is flexible. You can take input as command-line arguments or prompt for inputs, as well as either return or output/display the result. The inputs and output must be numbers, but you are free to determine what the second number would be (for example, 0 = single, 1 = married, 2 = head of household). Just don't be ridiculous - Single digit numbers only.
Also, functionality for decimal inputs (i.e. including cents) is undefined, so you only have to worry about integer inputs. For your output, you may either output a decimal value or round it to the nearest whole number.
Test Cases
Although the second number's range can be flexible as stated above, these test cases assume that 0 = single, 1 = married, and 2 = head of household:
25000 0 --> 0
37501 2 --> 0.1 or 0
51346 1 --> 134.6 or 135
75000 0 --> 7500
75000 1 --> 2500
123456 2 --> 13441.2 or 13441
424242 0 --> 91060.5 or 91061
0
,1
,2
can be considered "program information" \$\endgroup\$