Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Compound Interest Overview For this daily, write a program that will act as a compound interest calculator by calculating the future value of an account

image text in transcribed
image text in transcribed
Compound Interest Overview For this daily, write a program that will act as a compound interest calculator by calculating the future value of an account after a 4-year period with a fixed interest rate. The program should ask the user for the initial investment amount (double) and the annual interest rate (double). The prompts that are displayed for the user MUST match the prompts that are displayed in the output below. After getting the values from the user, calculate the future value of the account for each year over a 4 -year period. For each year, also calculate the amount the account increased from year to year. Finaily, display the output so that it is like what is shown in trF Output section. some of the formatting details to follow: All dollar amounts should be displayed with exactly 2 digits after the decimal point The initial investment should be displayed in a field that occupies fitteen (15) spaces - The annual interest rate should be disptayed with exactly 1 digit after the decimal point in a field that occupies thirteen (13) spaces. - The yearly values for the account and the amounts that the account increased should all be displayed with a leading dollar isen (5) 7. Print a newline at the end of the output. Calculations Value for year 1 n initial investment + (initial investment * interest rate / 100) Value for year 2 : value for year 1+ (Value for year 1 * interest rate /100) value for year 3= value for year 2 + (value for year 2 * interest rate /100f Value for year 4= value for year 3+( value for vear 3 . interest rate /100) Flle You Must Submit Place the program code in a source fie named interest.cpp Output (for 2 runs of the program) How much is the initial investment amount? 5000 What is the annual interest rate? 6.2 Investment Results Initial Investment 5000.00 Annual Interest Rate 6.2 Year 1 account value $5310.00 increase of $310.00 Year 2 account value $5639.22m increase of $329.22 Year 3 account value $5988.85m increase of $349.63 Year 4 account value $6360.16 increase of $371.31 ] Investment Results Initial Investment 120300.01 Annual Interest Rate 7.4 Year 1 account value $129202.21 increase of $8902.20 Year 2 account value $138763.17 increase of $9560.96 Year 3 account value $149031.65 increase of $10268.47 Year 4 account value $160059.99 increase of $11028.34

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

Draw the shear and moment diagrams forbeam. 2 kN/m 2 kN/m 3 m-

Answered: 1 week ago

Question

7. Identify six intercultural communication dialectics.

Answered: 1 week ago