Question: Write a MATLAB program that computes the amount of income tax a person needs to pay according to the following table: For example, if a

Write a MATLAB program that computes the amount of income tax a person
needs to pay according to the following table:
For example, if a person's income is $20,000.00, the income tax the person needs to pay is
$2,250.00(base tax for the second range) plus 18% of the excess income over $15,000.00(that
is,18% of $5,000). Therefore, the total tax due is $2,250.00 plus $900.00, which is $3,150.00.
Your program should first prompt the user to input an income (with the prompt of "Please
enter your income for 2018: "), then based on the amount and the above table
calculate the total amount of income tax. Your program should output to the command window
the total amount of tax as follows:
Your total 2018 income tax is:
x
where x is the calculated total amount of tax with two digits after the decimal point. For
example, if the calculated amount is $3,150, the value should be displayed as 3150.00. If the
income entered by the user is negative, your program should output to the command window:
invalid income
 Write a MATLAB program that computes the amount of income tax

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!