Question: points) Write a MATLAB program (a3q1.m) that computes the amount of income tax a person needs to pay according to the following table: Income Range

points) Write a MATLAB program (a3q1.m) that computes the amount of income tax a person needs to pay according to the following table:

Income Range Base Tax Excess From To Rate $0 $19,999.99 $0.00 0% $20,000 $49,999.99 $0.00 15% $50,000 $99,999.99 $7,500.00 25% $100,000 $249,999.99 $20,000.00 38% $250,000 ~ $77,000.00 51%

For example, if a person's income is $23,000.00, the income tax the person needs to pay is 15/100 $3,000 = $450.00. With an income of $79,000, the tax owing would be $7,500 + 25/100 ($79,000 - $50,000) = $14,750.00. Your program should first prompt the user to input an income. Use the following prompt: Please enter your income for 2020: Then, based on the amount entered and the above table, calculate the amount of income tax owing. Output to the command window the amount of tax as follows: Your total 2020 income tax is: xxxx where xxxx is the calculated amount of tax with a dollar sign and two digits after the decimal point. For example, if the calculated amount is $3,150, the value should display as $3150.00. If the income entered by the user is negative, your program should terminate with the following message sent to the command window: invalid income

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!