Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

5. Have you any experience with agile software development?

Answered: 1 week ago