Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ 1. Suppose you want to deposit a certain amount of money into a savings account and then leave it alone to draw interest for

image text in transcribed C++
1. Suppose you want to deposit a certain amount of money into a savings account and then leave it alone to draw interest for the next 10 years. At the end of 10 years you would like to have $10,000 in the account. How much do you need to deposit today to make that happen? You can use the following formula, which is known as the present value formula, to find out: The terms in the formula are as follows: .P is the present value, or the amount that you need to deposit today. .F is the future value that you want in the account. (In this case, F is $10,000.) r is the annual interest rate n is the number of years that you plan to let the money sit in the account. Write a program that has a function named PresentValue that performs this calculation. The function should accept the future value, annual interest rate, and number of years as arguments. It should return the present value, which is the amount that you need to deposit today. Demonstrate the function in a program that lets the user experiment with different values for the formula's terms

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_2

Step: 3

blur-text-image_3

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

6. Name the six virtues, and one related strength for each.

Answered: 1 week ago

Question

1 What are the dimensions used in Hofstedes model of culture?

Answered: 1 week ago