Program that has a function named presentvalue

Assignment Help Computer Engineering
Reference no: EM133462

Question

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

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

The terms in the formula are-

P is present value, or the amount that you want to deposit today. F is the future value that you want in 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 that performs this calculation. The function has to accept the future value, annual interest rate, and number of years as arguments. It should return the present value that is the amount that you need to deposit today. Show the function in a program that lets user experiment with different values for the formula's terms.

Reference no: EM133462

Questions Cloud

Get the cylinder class from the base circle class : Get the cylinder class from the base circle class
What are the sections of a cash budget : Use this information to purpose a cash budget for the months of May and June, using the template provided in Doc Sharing. What are the sections of a cash budget, and what is included in each section?
Studying the properties of a network : Studying the properties of a network
Cash and investments of a bond sinking fund : Cash and investments of a bond sinking fund established to service general government long-term debt.
Program that has a function named presentvalue : Program that has a function named presentValue
Net fixed manufacturing overhead cost : Net fixed manufacturing overhead cost incurred throughout a period
Demonstrate that the expected search time for hashing : Demonstrate that the expected search time for hashing
What is the current value of the operating cash : What is the current value of the operating cash outflows for the old machine?
What is the gain of using rule sets : What is the gain of using rule sets

Reviews

Write a Review

Computer Engineering Questions & Answers

  Illustrate the constraint graph

Illustrate the constraint graph

  Define role of customer and end-user on an agile process

Define role of customer and end-user on an agile process

  Create an xml document containing information

Create an XML document containing information.

  Program on wireless connection technology

Program on wireless connection technology.

  What are the kinds of information systems

What are the kinds of information systems

  Write a java program that creates an array of integers

Write a java program that creates an array of integers

  Illustrate precedence graph

Illustrate precedence graph

  How to concern about personal privacy, efficiency

How to concern about personal privacy, efficiency

  What is the memory operations dominate execution time

What is  the memory operations dominate execution time

  Determine highest distance

Determine highest distance

  Java program that asks the user to enter two numbers x and b

Java program that asks the user to enter two numbers x and b.

  What technologies are used in windows server 2008

What technologies are used in windows server 2008

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd