Question: So basiclly I'm supposed to get this output Enter future value Enter annual interest rate Enter number of years Present value: $295302.77 Future value: $1000000.00

So basiclly I'm supposed to get this output

Enter future value

Enter annual interest rate

Enter number of years

Present value: $295302.77

Future value: $1000000.00

Annual interest rate: 5.0%

Years: 25

**********

and i get this.How do i fix this?

So basiclly I'm supposed to get this output Enter future value Enter

**************************************************This is my code*********************************************************

#include #include #include using namespace std;

double futureVal() { double futureValue;

cout > futureValue;

return futureValue; } double annualInterest() { double interestRate;

cout > interestRate;

return interestRate; } int numOfYears() { int numberYears;

cout > numberYears;

return numberYears; } double calculatePresentValue(double futureValue, double interestRate, int numberYears) { return futureValue/pow((1+interestRate),numberYears);

}

int main() { double resultPresentValue;

double futureValue = futureVal(); if (futureValue

double interestRate = annualInterest(); if (interestRate

interestRate = interestRate/100; int numberYears = numOfYears(); if(numberYears

resultPresentValue = calculatePresentValue(futureValue, interestRate, numberYears); { cout

return 0; }

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!