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;
           {
Sky Diploma commented: Its a Very Bad Title, And No Code TAGS on the 13 Post. -1
kvprajapati commented: N.A -2

Recommended Answers

All 2 Replies

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.

commented: The sloppy posting and sloppy coding is probably no coincidence then ;) +36

Only one comment about your post, please use the code tags as the signature of Sky Diploma!

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.