Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

What are the steps involved in the collective bargaining process?

Answered: 1 week ago

Question

3. Would you say that effective teamwork saved their lives?

Answered: 1 week ago