To help with potential debugging problems, here is one example run annotated with the account balance and interest balance at the end of each simulated day in a five week simulation.
~/$ ./part4
run 5 c300.txt
initibal = 700
paycheck = 550
saverate = 4
loanrate = 14
End of day 01: balance = 660, interest = 0.0723288
End of day 02: balance = 620, interest = 0.140274
End of day 03: balance = 580, interest = 0.203836
End of day 04: balance = 540, interest = 0.263014
End of day 05: balance = 500, interest = 0.317808
End of day 06: balance = 460, interest = 0.368219
End of day 07: balance = 420, interest = 0.414247
End of day 08: balance = 380, interest = 0.45589
End of day 09: balance = 340, interest = 0.493151
End of day 10: balance = 300, interest = 0.526027
End of day 11: balance = 260, interest = 0.554521
End of day 12: balance = 220, interest = 0.57863
End of day 13: balance = 730, interest = 0.65863
End of day 14: balance = 690, interest = 0.734247
End of day 15: balance = 650, interest = 0.805479
End of day 16: balance = 610, interest = 0.872329
End of day 17: balance = 570, interest = 0.934795
End of day 18: balance = 530, interest = 0.992877
End of day 19: balance = 490, interest = 1.04658
End of day 20: balance = 450, interest = 1.09589
End of day 21: balance = 410, interest = 1.14082
End of day 22: balance = 370, interest = 1.18137
End of day 23: balance = 330, interest = 1.21753
End of day 24: balance = 290, interest = 1.24932
End of day 25: balance = 250, interest = 1.27671
End of day 26: balance = 210, interest = 1.29973
End of day 27: balance = 720, interest = 1.37863
End of day 28: balance = 680, interest = 1.45315
End of day 29: balance = 640, interest = 1.52329
End of day 30: balance = 600, interest = 1.58904
End of day 31: balance = 561.589, interest = 0.061544
End of day 32: balance = 521.589, interest = 0.118704
End of day 33: balance = 481.589, interest = 0.171481
End of day 34: balance = 441.589, interest = 0.219875
End of day 35: balance = 401.589, interest = 0.263884
Ending interest = 0.263884
Ending balance = 401.589
Average end-of-day balance = 483.084