Question: Objectives: Write a function. Implement an accounting equation. Tasks: Create a new CodeBlocks project lab6. Suppose you want to deposit a certain amount of money
Objectives: Write a function. Implement an accounting equation. Tasks: Create a new CodeBlocks project "lab6". Suppose you want to deposit a certain amount of money into a savings account today and then leave it alone to draw interest. How much would you need to deposit today to reach a goal amount after a given number of years? You can use the present value formula to find out: 1. 2. p=(1 + r)n The terms in the formula are as follows P is the present value, the amount you need to deposit today F is the future value you want in the account at maturity r is the annual interest rate n is the number of years that you plan to l . . let the money accrue interest 3. Write a function named presentValue) a. The function should accept as arguments The future value The annual interest rate . The number of years the money will accrue interest b. The function should return The present value Write a program to demonstrate the function. Let the user try different values for the formula's terms. Take a screenshot of your program using F = $10,000, r-0.02, and n- 10 4. 5. Zip yo ur project folder, including a screenshot of your program run, and submit the zip archive to Blackboard
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
