Hi everyone, I have a few simple questions that I am not figuring out. Below is code for a program that cins an amount from the user, asks for an interest rate, and calculates interest earned with a new balance each year for 10 years. I know the code is a mess right now but I am having a problem with the for loop. I can get it to display:
Year Balance
____ _______
1
2
3
4
5
6
7
8
9
10
How do I get the initial balance (input by the user) in the first year and then update each year? Assuming there is only one deposit and they earn x% each year.
int main()
{
// int amount;
double interest;
double balance;
// double per;
cout << "What is the initial amount in the account? ";
cin >> balance;
cout << "What is the interest rate? ";
cin >> interest;