Taxpayer to contribute to a roth ira

Assignment Help Programming Languages
Reference no: EM13812856

Program- The IRS allows a taxpayer to contribute to a ROTH IRA, if his/her income is not over a specified limit and his/her filing status allows contributions.

You will write a program that carries out the logic of a simplified worksheet to determine how much may be contributed to a ROTH IRA.

Sample IRS-like instructions for each line of the worksheet: This worksheet may not be used by any taxpayer who is married filing separately, and did not live with their spouse any time during the year.

Line 1

Determine maximum possible ROTH IRA contribution limit.

If under age 50, enter $5,500 on line 1. Otherwise, enter $6,500 on line 1.

Line 2

Enter the modified Adjusted Gross Income for IRA purposes on line 2.

Line 3

Determine the Income Limit amount for full contributions, according the filing status from the list below and enter limit on line 3:

Single or Head of household - $ 112,000

Married filing jointly or Qualifying Widow(er) - $ 178,000

Married filing separately and lived with spouse any time during year - $ 0

Line 4

Determine if a reduction to the contribution limit is necessary.

Is the amount on line 2 less than or equal to the amount on line 3?

Yes. Can contribute up to maximum contribution limit. Skip lines 4 - 8 and enter the amount from line 1 on line 9 (ignore line 9 instructions) No. Contribution limit may be reduced. Subtract line 3 from line 2 and enter the amount on line 4 and continue.

Line 5

Determine division amount to use, depending on filing status, and enter it on line 5:

Single or Head of household - $ 15,000

Married filing jointly or separately, or Qualifying Widow(er) - $ 10,000

Line 6

Determine reduction percentage.

Divide line 4 by line 5 and determine the floating point result rounded to 3 places. Is the result is 1.0 or more?

Yes. Cannot contribute to a ROTH IRA.

Skip lines 6 - 8 and enter 0 on line 9 (ignore line 9 instructions)

No. Contribution limit will be reduced.

Enter the calculated reduction percentage rounded to 3 places on line 6.

Line 7

Determine reduction amount.

Multiply line 6 by line 1 and enter the result on line 7

Line 8

Determine possible contribution limit.

Subtract line 7 from line 1. Round the result up to the nearest $10, and enter result on line 8

Line 9

Enter the larger value: line 8 or $200.

This line 9 amount is your ROTH IRA contribution limit.

Determine if the taxpayer should continue, or if the program should exit.

If the taxpayer's filing status is married filing separately

Ask if the taxpayer lived with his/her spouse at any time during the year.

(User input can be in either upper or lowercase.)

If the answer is no, the taxpayer may not contribute to a ROTH IRA. contribution.

Display a message saying so (see Sample 2 Output below) and pause.

Then return from main with exit code of 1, to indicate that the program returned before line 1.

return 1;

oIf the program did not exit, continue.

Read and store the taxpayer's age.

Perform a test to determine and store the amount for line 1.

Read and store Adjusted Gross Income for IRA purposes for line 2.

Determine the line 3 income limit that applies for the filing status entered, and store the result.

o HINT: Store the filing status description in words into a string variable at the same time.

Display the Worksheet title and the first 3 lines (1 - 3) of the worksheet.

Perform the line 4 test to determine if the program needs to continue.

oIf line 2 is less than or equal to line 3

Display the amount from line 1 on line 9, and pause.

Then return from main with exit code of 4, to indicate that the program exited on line 4.

return 4;

oIf the program did not exit, continue.

Perform the necessary calculation for line 4 and store the result.

Determine the line 5 division amount to use for the filing status entered, and store it.

Display lines (4 and 5) of the worksheet.

Perform the necessary calculation for line 6 and store the result.

Perform the line 6 test to determine if the program needs to continue.

If the result is 1.0 or more, taxpayer cannot contribute to a ROTH IRA:

Display a message, and pause (see Sample 4 output)

Then return from main with exit code of 4, to indicate that the program exited on line 6.

return 6;

oIf the program did not exit, continue.

ROTH IRA Contribution Limit Worksheet

Filing Status: Married, Filing Jointly

1. Possible contribution limit: 5500.00

2. Adjusted Gross Income 180330.00

3. Income Limit: 178000.00

4. Amount over Limit: 2330.00

5. Division amount: 10000.00

6. Reduction Percentage: 0.233

7. Reduction Amount: 1281.50

8. Reduced contribution limit: 4220.00

9. Maximum ROTH IRA Contribution Limit 4220.00

Perform the necessary calculation for line 7 and store the result.

Call a user-defined function to find the amount for line 8 and store the value returned.

The user-defined function will have two input arguments:

theline 1 amount and the line 7 amount

The function will subtract line 7 from line 1.

The function will round the result to the nearest $10.

Reference no: EM13812856

Questions Cloud

What will be the number of fans to purchase : What will be the number of fans to purchase if Irwin's desires to have a 90% chance of not running out of stock during a summer season and Estimate the mean and the standard deviation of demand for the fans each summer.
Explain the u.s. supreme court''s interpretation : Analyze the relevance of habeas corpus to the contemporary U.S. situation during the war on terror, especially with respect to persons characterized by as enemy combatants or illegal combatants.
Determine the essential trade-off problems of projects : Determine the essential trade-off problems of projects today that have competing constraints. Include such topics as quality, image, risk, reputation, goodwill, and legal liability in your determination. Support your response and rationale with re..
Amulets and talismans : Amulets and Talismans
Taxpayer to contribute to a roth ira : Program- The IRS allows a taxpayer to contribute to a ROTH IRA, if his/her income is not over a specified limit and his/her filing status allows contributions
Falling barriers to trade and investment : How do the changing technology and the falling barriers to trade and investment reflect the success of this company? How does the company show corporate social responsibility in terms of labor conditions, human rights, fair trade, and the environmen..
Write a review paper about the given article : Write a review paper about the article "Business Ethics: A Manual for Managing a Responsible Business Enterprise in Emerging Market Economies" by Kenneth W. Johnson and Igor Y. Abramov.
Operations team of a midsize manufacturing company : You are a new member of the operations team of a midsize manufacturing company with 500 employees. The decision makers at your manufacturing plant are struggling to meet production performance levels. After evaluating the company's performance lev..
Tar trek synopsis and/or episode found in the reading : After reading the synopsis (or viewing the episode), write a substantive response (at least 350 words) and post it in the forum. Your thread must address the first question below. You may also address several of the other questions, but the bulk of y..

Reviews

Write a Review

Programming Languages Questions & Answers

  Design a gui that runs a simulink model

Use a numerical intergration to determine the distance x the airplane travels as a function of time. Make a plot of x versus time. Design a GUI that runs a Simulink model to solve questions (a) and (b).

  Hubspot: inbound marketing and web 2.0

Hubspot: Inbound Marketing and Web 2.0

  Program to inputs encrypted four-digit integer

Write separate program to inputs encrypted four-digit integer and decrypts it to form the original number. thanks in advance for ur help.

  Framework of the program

Write a program to read in up to 100 positive real values from a data file that everyone will name "p4data.dat" , output them in ascending order , calculate and print the average , the median , the variance , and the standard deviation . The..

  Describe the design and application of arrays

Describe the design and application of arrays and how the array simplifies program development. Support your answer with hypothetical real-world example.

  Find largest number in array

Find the largest number in the array and output the result. use a subprogram to input the numbers, a function to use the largest number.

  Basic concepts of object-oriented analysis and design

Diagram methods introduces the student to the basic concepts of object-oriented analysis and design. Use case modeling, class modeling and state modeling using common notations are covered

  Develop two packages to accept information

Develop two packages, package1 comprises two classes manager and clerk.both classes having method to accept corresponding information.packages.

  Write application to count number of both odd-even integers

Write application to count number of both odd and even integers of several positive integers. Fisrt value entered specifies number of values to input from user.

  Falling letters game

Generic queue in the first project and generic list in the second project - In the second project, the player clicks the mouse on any falling letter to remove that letter from the window.

  Is this an example of head or tail recursion

Referring to the code in Part 1, use the substitution model to illustrate what the result of calling (add1-iter '(1 2 3)) will be. Why is the list reversed ?

  What programming language did grace hopper invent

What programming language did Grace Hopper invent. What was the name of the network begun in 1969? What does it stand for

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