Hello! First time poster, and I was wondering if anyone could help me figure out what to do at the end of this assignment. The whole point is that I am constantly putting down payments of 100 dollars towards $5000 in a savings account that increases in interest by 1%. As time goes by, the interest and balance increases and the shortage decreases. The problem I am having is that at the end, I can no longer put down 100 dollars to reach exactly 5000 in my balance. How would I go about changing it so that I get the exact amount of interest and payment needed? This is what I have so far:
once you get this output then you can write a code that checks what is missing from the balance
1 2 3 4 5
interest = .001*balance;
balance+=interest // bal now = 4924.22 (somthing like that)
missing = balance - 5000 // missing = 75.78
//now add missing to balance and take a way missing from the shortage