-2

i need help writing a program that includes a function that computes future investment value at the given interest rate for a specified number of years. I have started out but do not know what to do next to get this program to work. here wut i have

#include <iostream>
#include <iomanip>
using namespace std;


double futureInvestmentValue(double investmentAmt, double monthlyInterestRate, int years);
int main()
{

    double monthlyInterestRate, double investmentAmt;

    cout<<"Please enter the investment amount:   "<<endl;
    cin>>investmentAmt;
    cout<<"Please enter the interest rate:   "<<endl;
    cin>>monthlyInterestRate;
    cout<<endl;


     system("PAUSE");
    return 0;

}

double futureInvestmentValue(double investmentAmt, double monthlyInterestRate, int years)
{
       double investmentAmtValue;
       int i, array[i];


       accumulatedValue= investmentAmount*(1 + monthlyInterestRate) * (years *12)

       for (i=0; i > 30;++)
       {
           array[i]=AccumalatedValue
           cout<<array[i]<<endl;
           {

Edited by Nick Evan: Fixed formatting

Votes + Comments
N.A
Its a Very Bad Title, And No Code TAGS on the 13 Post.
3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Nathan Campos
1

Are you sure if your code compiles, Its your 13th post and The Lack of Code Tags make this program a lot more messier.

for (i=0; i > 30;++)
{
array[i]=AccumalatedValue
cout<<array[i]<<endl;
{ //Shouldnt this be '}'

And where is the ending Brace for the function itself.

Apart from all that, I suggest that you get back to a Pen and Paper and precisely think of how you can work out your task. After which you could start out the code.

Votes + Comments
The sloppy posting and sloppy coding is probably no coincidence then ;)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.