Question: Please code this in C++ and the second picture are the outputs Objective: The purpose of this problem is to give you practice defining and

 Please code this in C++ and the second picture are theoutputs Objective: The purpose of this problem is to give you practice

Please code this in C++ and the second picture are the outputs

Objective: The purpose of this problem is to give you practice defining and calling functions. Especially, it trains you how to use different function parameter calling. Note that you must use call by reference (with &) if the data change inside the called function must be seen by the calling function; otherwise it is always better to use call by value to maintain the data integrity and data protection. Specifications: Write a program that will calculate the amount of money (Present Value) that you need to deposit into an account today at an annual interest rate of r in order to have a specific amount of money (Future Value) in n years. The formula you will use to calculate the Present Value is the following. (1 + r)n where P is the Present Value, F is the Future Value, r is the annual interest rate, and n is the number of years the money is left in the account. We want you to use 3 functions in your main() program. The first will be getUserValues() which will ask the user to input the Future value, annual interest rate, and number of years and pass these values back to the main() program. The second will be presentValue() which will calculate and return the Present Value. Future value, annual interest rate, and number of years will be passed to this function. The third will be display() and all 4 variables, Present Value, Future Value, annual interest rate and number of years will have to be passed to this function. Your program should show something similar to the following output. Enter the future value that you want in the account: 1000 Enter the annual interest rate: 0.03 Enter the number of years you will leave the money in the account: 10 If you deposit $744.09 today in an account, with an annual interest rate of 3.00% for 10 years, you will have $1000.00. Enter the future value that you want in the account: 1000 Enter the annual interest rate: 0.12 Enter the number of years you will leave the money in the account: 10 If you deposit $321.97 today in an account with an annual interest rate of 12.00% for 10 years, you will have $1000.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!