The progressive income tax rate is mandated as follows: Taxable Income Rate (%) First $20,000 0 Next $20,000 10 Next $20,000 20 The remaining 30 For example, suppose that the taxable income is $85000, the income tax payable is $20000*0% + $20000*10% + $20000*20% + $25000*30%. Write a program called IncomeTaxCalculator that reads the taxable income (in int). The program shall calculate the income tax payable (in double); and print the result rounded to 2 decimal places. For examples, Enter the taxable income: $41234 The income tax payable is: $2246.80 Enter the taxable income: $67891 The income tax payable is: $8367.30 Enter the taxable income: $85432 The income tax payable is: $13629.60 Enter the taxable income: $12345 The income tax payable is: $0.00
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
. The progressive income tax rate is mandated as follows:
Taxable Income |
Rate (%) |
First $20,000 |
0 |
Next $20,000 |
10 |
Next $20,000 |
20 |
The remaining |
30 |
For example, suppose that the taxable income is $85000, the income tax payable is $20000*0% + $20000*10% + $20000*20% + $25000*30%.
Write a
Enter the taxable income: $41234
The income tax payable is: $2246.80
Enter the taxable income: $67891
The income tax payable is: $8367.30
Enter the taxable income: $85432
The income tax payable is: $13629.60
Enter the taxable income: $12345
The income tax payable is: $0.00
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 5 images