cout <<"Current Total Investment: "<<"$"<<TotalInvestment<<endl;
cout <<"Type another investment: "<<"$"<<flush;
}
cout <<"\n Overall Investment: "<<"$"<<sum<<endl;
return 0;
}
~
!g++ inv.cpp && a.out
Enter the annual interest rate of investment: %.06
Enter the initial amount of desired investment: $200
Current Total Investment: $212.00
Type another investment: $333
Current Total Investment: $352.98
Type another investment: $111
Current Total Investment: $117.66
Type another investment: $^D
Overall Investment: $564.98
I am very new to this. Well my problem is that when it calculates Overall Investment it only adds two values. Also I am not getting the rite overall investment im supposed to get 730.02. Please Help Ive been working on this for hours Thanks.