Alright, so after doing some minor math, I just moved your variables around. Essentially you were just redefining your variables each year, but to the same values each time. That math can go before the for loop. Now, since you want some other math done each year, that needs to go at the bottom of the for loop to represent the end of year being recalculated.
I also changed the 100 to 100.0 to do double division (return a non whole number value) to make your inflation correct. I underlined all of the changes I made from your original code.
Here is the sample input you gave me and the final output:
Enter the balance for your minimum sum and savings:123000 100000
Enter your annual average expenses:15000
Enter the inflation percentage:5
YEAR EXPENSES END-OF-YEAR BALANCE
---------------------------------------------
1 15000.000 208000.000
2 15750.000 192250.000
3 16537.500 175712.500
4 17364.375 158348.125
5 18232.594 140115.531
6 19144.223 120971.308
7 20101.435 100869.873
8 21106.506 79763.367
9 22161.832 57601.535
10 23269.923 34331.612
11 24433.419 9898.193
12 25655.090 -15756.898
13 26937.845 -42694.743
14 28284.737 -70979.480
15 29698.974 -100678.454
16 31183.923 -131862.377
17 32743.119 -164605.495
18 34380.275 -198985.770
19 36099.289 -235085.059
20 37904.253 -272989.312
I hope this is what you wanted.
Edit: I think you might want to setprecision to 2 instead of 3.