A country charges income tax as follows based on one’s gross salary. No tax is charged on the first 20% of salary. The remaining 80% is called taxable income. Tax is paid as follows: 10% on the first $15,000 of taxable income; 20% on the next $20,000 of taxable income; 25% on all taxable income in excess of $35,000; Write a program to read a value for a person’s salary and print the amount of tax to be paid in dollars. Additional information: You may assume all data entered into your program is correct
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:
A country charges income tax as follows based on one’s gross salary. No tax is charged on the first 20% of salary. The remaining 80% is called taxable income. Tax is paid as follows:
- 10% on the first $15,000 of taxable income;
- 20% on the next $20,000 of taxable income;
- 25% on all taxable income in excess of $35,000;
Write a
Additional information:
- You may assume all data entered into your program is correct
Step by step
Solved in 3 steps with 1 images