Write a program to compute income tax

Assignment Help C/C++ Programming
Reference no: EM132277807

Assignment: Write a program to compute income tax as follows:

First, read the user's income for the year. Then, display the following menu and ask the user to select his or her filing status:

1. Single

2. Married filing separately

3. Married filing jointly

4. Head of household

After the user makes the selection, determine the amount of the deduction.

Deduction is the amount that gets deducted from the income to arrive at the taxable income. There are 4 different deductions that can be made: 1) a standard deduction, 2) deduction for dependents, 3) deduction for out of pocket medical expenses, 4) deduction for expenses due to attending college full time.

1) For Single status, the standard deduction is $2000, for Married filing separately it's $1500, for Married filing jointly, $2500 and for Head of household, deduction is $3000.

2) Then, ask for and read the number of dependents from the user. If filing as Single, add to the deduction, $150 for each dependent, up to a maximum of 4 dependents. In other words, if number of dependents is larger than 4, treat it as 4 dependents. If Married filing separately, add $125 for each dependent up to a maximum of 4 and if married filing jointly and head of household, add $175 to the deduction for each dependent, up to a maximum of 4.

3) Then, ask if the tax payer had any uncovered medical expenses. If so, add to the deduction 10% of any uncovered (out-of-pocket) medical expenses.

4) Then, ask if the tax payer was a full time student during the year. If so, read the amount of expenses relating to college and add 10% of those expenses to the deduction.

Then, compute the taxable income by subtracting the total deductions from his or her income. Finally, compute the tax. Anyone with a taxable income of less than $10,000 pays no taxes. For the rest, the first $20,000 of the income has a tax rate of 10%, the next $30,000 gets taxed at 15%, the next $50,000 at 20%, and anything above $100,000 at 30%. Remember there are 4 tax brackets and the percentage of taxes is different for each bracket. So, if the income spans over multiple brackets (anything over $20,000), each part of the income is taxed at a different percentage.

For someone with income of $13,000, the tax is simply 10% of that or $1,300. But, for someone who made $30,000, it would be 10% of $20,000 or $2,000 plus 15% of the remaining $10,000 or $1,500, making it $3,500. For someone who had taxable income of $125,000, her first $20,000 gets taxed at 10% ($2,000), plus 15% of $30,000 ($4,500), plus 20% of $50,000 ($10,000), and the remaining $25,000 at 30% ($7,500) for a total tax amount of $24,000. For someone who made $7,999 it would be 0, but for someone who made $8,000, it's $800, and so on.

Print the amount of taxes due in currency format (2 decimal places).

The following is a sample interaction between the user and the program:

Enter total income for the year (including wages, tips, bonuses, interest, winnings, etc.): $50000

What was your filing status during the year?

1. Single

2. Married filing separately

3. Married filing jointly

4. Head of household

Enter one of the above choices: 3

Enter number of dependents (excluding yourself): 3

Did you have any uncovered medical expenses? [y/n]: y

Enter amount of out-of-pocket medical expenses (copay, deductible, patient's portion): $1000

Were you a full time student during the year? [y/n]: y

Enter amount of college expenses (excluding any financial aid received): $500

The amount of your income tax is $6023.75

Press any key to continue.

Another example:

Enter total income for the year (including wages, tips, bonuses, interest, winnings, etc.): $20000

What was your filing status during the year?

1. Single

2. Married filing separately

3. Married filing jointly

4. Head of household

Enter one of the above choices: 1

Enter number of dependents (excluding yourself): 0

Did you have any uncovered medical expenses? [y/n]: n

Were you a full time student during the year? [y/n]: n

The amount of your income tax is $1800.00

Reference no: EM132277807

Questions Cloud

How are each of these expressed across : How are each of these expressed across the contexts of self, organizations, community, and society?
How would you design a structure and control system : How would you design a structure and control system to encourage entrepreneurship in a large, established corporation?
What specifically did he do that indicated he was coaching : Cite an example from the movie when Coach Boone used a Coaching leadership style. What specifically did he do (behavior) that indicated he was Coaching?
The differences between private and public health insurance : Provide a definition of both private and public health insurance, and discuss the differences between private and public health insurance.
Write a program to compute income tax : Write a program to compute income tax as follows: First, read the user's income for the year. Then, display the following menu and ask the user to select.
Compare and contrast two cloud service providers : Compare and contrast two cloud service providers and their services. By doing this assignment, you will acquire a good understanding of available cloud service
Describe what is meant by the terms restructuring : Describe what is meant by the terms restructuring, and reengineering, and discuss when and why they would be used?
What changes will need to occur to ensure : Do you think that the health care workforce of today is effectively meeting the needs of the aging population?
Examine architecture and configurations of computing systems : Examine the architecture and configurations of computing systems by writing a brief paper describing your ideal personal computer. State your main use.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd