← Back to If Statements
Question 252
Income Tax Brackets
Income Tax Brackets
Read a yearly income and print the income tax owed to two decimals in the form Tax: <amount>. The first 10000 is tax free; income from 10000 up to 40000 is taxed at 10 percent on the part above 10000; income above 40000 pays 3000 plus 20 percent of the part above 40000. Input: one line, the income as a decimal number, no prompt. Output: one line, formatted with :.2f.
Expected Output:
Tax: 0.00= newline. The output ends with a newline — print one after the last line.
Hints4 available
Sign in to use hintsTopics:
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.