Question: Build a program based on the following scenario: The United States federal personal income tax is calculated based on filing status and taxable income. There
Build a program based on the following scenario:
The United States federal personal income tax is calculated based on filing status and taxable income. There are two filing statuses: single and married. Table below shows the tax rates. If you are, say, single with a taxable income of $50,000, the first $30,000 is taxed at 10% and other $20,000 is taxed at 20%, so, your total tax is $7,000.
| Tax Rate | Single | Married |
| 10% | $0 - $30,000 | $0 - $50,000 |
| 20% | $30,001 - $80,000 | $50,001 - $100,000 |
| 35% | < $80,000 | <$100,000 |
Write a program that displays a menu allowing the user to select one of these two filing statuses (single = 1, married = 2). After a selection has been made, the user should enter the amount of taxable income. The program should then compute tax and display filing status, taxable income, and tax amount.
Input Validation: check that the user has selected one of the available menu choices. If not, display error message and ask to enter 1 or 2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
