Question: The problem is: F = P X (1 +i)^t F is the future value of the account after the specified time P is the present

The problem is:

F = P X (1 +i)^t

F is the future value of the account after the specified time

P is the present value of the account

r is the annual interest rate

n is the number of months

Write a program that promputs the user to enter the account's present value, monthly interest rate, and the number of months thta the money will be left in the account. The program should pass these values through a function named futureValue that returns the furture value of the account, after the specified number of months, The program should display the account's future value. This is being done in Microsoft Visual Studio C++

This is the code I have for this problem but itis not working. What errors have I made?

#include #include #include using namespace std;

double futureValue(double, double, double);

int main() { double futurevalue, presentValue, monthlyRate, months;

cout << "Enter the account's present value" << endl; cout << "Enter the account's monthly interest rate" << endl; cout << "Enter the number of months that the money will be left in the account" << endl; futurevalue = futureValue(presentValue, monthlyRate, months); cout << "The future value is $" << setprecision(2) << fixed << futurevalue;

} double futureVaule(double presentValue, double monthlyRate, double months) { double futurevalue; cin >> presentValue; cin >> monthlyRate; cin >> months; futurevalue = presentValue * pow((1 + months), monthlyRate); cout << "The future value is $" << setprecision(2) << fixed << futurevalue << endl;

}

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!