Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

!!Please do this in c!!! not c+ A 401(k) plan is a type of tax-qualified account for people to save for retirement. Employees typically have

!!Please do this in c!!! not c+

A 401(k) plan is a type of tax-qualified account for people to save for retirement. Employees typically have part of their pre-tax pay check deposited into such an account and employers may match a certain amount of those contributions. As of 2018, there was a maximum annual contribution limit of $18,500. The money contributed to a 401(k) account may be invested in many different ways. While the account may grow tax free, it is not immune to inflation. To account for inflation, you can use the following formula which is the inflation-adjusted rate of return. inflation-adjusted rate of return = ((1 + rate of return)/(1 + inflation rate)) 1

Write a program that produces an amortization table for a 401(k) account. Your program will read the following inputs as command line arguments: An initial starting balance A monthly contribution amount (well assume its the same over the life of the savings plan) An (average) annual rate of return (on the scale [0, 1]) An (average) annual rate of inflation (on the scale [0, 1])

A number of years until retirement Your program will then compute a monthly savings table detailing the (inflation-adjusted) interest earned each month, contribution, and new balance. To get the monthly rate, simply divide by 12. Each month, interest is applied to the balance at this rate (prior to the monthly deposit) and the monthly contribution is added. Thus, the earnings compound month to month. Be sure to round appropriately, to the nearest cent so that rounding errors do not compound.

Your program will need to validate the input and quit with an error message on any potential bad input(s).

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 Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

Understand risk tolerance and how it is measured.

Answered: 1 week ago