questionassume you want to deposit a certain


Question

Assume you want to deposit a certain amount of money into a saving account, and after that leave it alone to draw interest for next 10 years. At the end of 10 years you would like to have $10,000 in account. How much do you require to deposit today to make that happen? You can use following formula, that is known as the present value formula, to locate out-

P= F/(1/+r)^n

The terms in formula are-

P is present value, or amount that you require 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 (expressed in decimal form) n is number of years that you plan to let the money sit in the account.

Write down a program that has a function named presentValue which performs this calculation. The function has to accept the future value, annual interest rate, and number of years as arguments. It has to return the present value, which is amount that you require to deposit today. Demonstrate function in a program that lets the user experiment with dissimilar values for the formula's terms.

 

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: questionassume you want to deposit a certain
Reference No:- TGS0443962

Expected delivery within 24 Hours