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 $ the income tax the person needs to pay is
$base tax for the second range plus of the excess income over $that
is of $ Therefore, the total tax due is $ plus $ which is $
Your program should first prompt the user to input an income with the prompt of "Please
enter your income for : 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 income tax is:
where is the calculated total amount of tax with two digits after the decimal point. For
example, if the calculated amount is $ the value should be displayed as If the
income entered by the user is negative, your program should output to the command window:
invalid income
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
