Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c programming You have been contracted to write a program f or an investment house. They want to use this program to try and get

image text in transcribed

image text in transcribed

c programming

You have been contracted to write a program f or an investment house. They want to use this program to try and get people to invest for retirement This program will calculate the earnings on a Roth Individual Retirement Account (RA) A Roth RA (named after the Senator who proposed this retirement plan) lets you deposit after-tax 50 s then all the earnings you made from the investments are tax free (normally these uld be subjected to capital gains tax). Your program will be running twso simulations and storing the answers in two different float arrays 2 Points) Comment the top of your code with your name and the date. Make all of your variable names meaningful and easy to understand 2 Points) Make sure your code is neat (braces tabbed in and lined up) (2 Points) Read the initial investment for your Roth IRA and store it in element zero of the array. This investment value must be greater than $0 (obviously) and less than or equal to $5500 (the current maximum yearly limit) (2 Points) Read in an integer representing the number of years until retirement. This value represents how many years will pass before you are going to use the money and this is called the TERM. The term value should be between 1 and 50 (2 Points) Read in an assumed rate of return. This is a value that will represent how much the investment will increase (or decrease) each year. This value will be a float value that will be between 15 and 15. In reality, this number would change each year but to keep the program simple we are going to assume this value is fixed for the term (length) of the investment 4 Points) Do not do any calculations if any of the previous three values are invalid 2 EC Points) If the user enters a value that is less than $0 or greater than $5500 have the program wam the user of the limits and ask them to re-enter the starting value be used for the rate of retum and the number of years (2 Point) Once a valid value has been entered into element zero of the float array, copy The program should not advance until a valid value is entered. This same logic should the starting value into element zero of a second float array (10 Points) Use one of the arrays to figure out how much the retirement account would be worth ea ch year if the investor put money in the account once and never again. The equation to calculate the yearly balance with no yearly contribution is NewBalance OldBalance (1+(InterestRate /100.0)

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

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions