Answer to Question #225883 in C++ for Ulando

Question #225883

Write a program to compute future investment value at a given interest rate for a specified number of years.the future investment is determined using the formula:

Futureinverstmentvalue=inverstmentamount *(1+ monthly interest rate)^(years*12)


1
Expert's answer
2021-08-16T05:48:46-0400
#include <iostream>
#include <cmath>
#include <cstdio>


using namespace std;


double future(double amount, double rate, int year){
        double invest = amount*(pow(1+rate, 12*year));
        return invest;
}


int main()
{
        double invest = future(2000, 0.3, 4);
        cout << "Future investment value: ";
        printf("%.5f\n", invest);


        return 0;
}

Output:
Future investment value: 589265352.63802

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS