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

  Can a relation be stored as a sequential file

Can a relation be stored as a sequential file

  Propose a wiring plan for network servers

Propose a wiring plan for network servers.

  Spreadsheet model of the heat transfer situation

Spreadsheet model of the heat transfer situation

  How to write a program to check the collision

How to write a program to check the collision Write down a java program to check if they will collide or not. If they are going to collide print a message that 'The crafts will collide at (x,y)' where co-ordinates (x,y) are on Map as points of co..

  How to set up or recover cybersecurity

How to set up or recover cybersecurity.

  Illustrate the constraint graph

Illustrate the constraint graph

  Describe a project that increase an intranet

Describe a project that increase an Intranet.

  Execute a class person with two fields name and age

Execute a class Person with two fields name and age.

  Generate the tables attach the primary key and foreign key

Generate the tables attach the primary key and foreign key

  Determining the priority of period of execution of irqj

Determining the priority of period of execution of IRQJ

  Encipher a message using a keyword

The first program will encipher a message using a keyword and second program will decipher a message using a keyword.

  Type of data standard

What type of data standard are we dealing with in each scenario (metadata, spatial or attribute)? You work for Town of Ancaster prior to an amalgamation of New City of Hamilton. Your main responsibility was to retain Town's single line road network f..

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