Answer:
The code is given in C++ below
Step-by-step explanation:
#include <iostream>
using namespace std;
int main()
{
float fv,pv,r,k,n,pmt,totalmoneyinvested;
pv=1000.00;
r=6/100;
k=12; //The value of k should be 12 for monthly installments
n=45;
pmt=250;
totalmoneyinvested=pv+(pmt*12*45); //The total money you invested
fv=pv*(1+r/k)*n*k+pmt*((1+r/k)*n*k-1)*(1+r/k)*r/k;
cout<<"Initial Investment:"<<" $"<<pv;
cout<<"\\Rate Of Return:6%";
cout<<"\\Length of Time:"<<n<<"year";
cout<<"\\Monthly Payment:"<<" $"<<pmt;
cout<<"\\Final Amount:"<<" $"<<fv;
cout<<"\\The Money You Invested Is $"<<totalmoneyinvested<<" And The Final Amount Is $"<<fv;
return 0;
}