Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

More Books

Students also viewed these Databases questions

Question

establish an effective note-taking and recording system;

Answered: 1 week ago

Question

How to solve maths problems with examples

Answered: 1 week ago