Future Value Program

My program is not running, my class use this compiler cpp.sh/5cgy would appreciate someone helping me get this to run, im new to this so i need to it to be explained sesame street style. When i run it it has a huge mess

#include <iostream>
#include <cmath>

using namespace std;

// The general formula to calculate future values is: Future Value (FV) = (PresentValue).(1+r).(t)
void futureValue(double pV, double r, double t);
int main()
{
double pV = PresentValue;
double r = .05;
double t = 5;
cin >> pV ;
cout << "Please enter the Present Value:" << endl;
cin >> pV ;
cout << futureValue(pV, r, t);


return 0;

(PresentValue).(1+r).(t)
}

void futureValue (double pV, double r, double t)
{
cout << pV * (1+r) * t << endl;

}
Hi,

please use code tags for your code to make it more readable - http://www.cplusplus.com/articles/jEywvCM9/

double pV = PresentValue;
I don't see "PresentValue" Anywhere, what is this?

(PresentValue).(1+r).(t)
What are you trying to do here?
r is the interest rate in a period of time, t is the number of periods until a future moment
Present Value is the amount of money the user enters. Im trying to create a function that calculates the future value of the amount entered by the user. Im very new to programming so im still kinda lost
Last edited on
Topic archived. No new replies allowed.