Code:

float monthly_pay = monthly_rate * balance;

"monthly_rate" and "balance" are initialized before the loop, and their values never change inside of the loop, therefore the product of these two values will be the same for each loop iteration.

Code:

float interest_paid = anual_rate / length * balance;
float principal_paid = monthly_pay - interest_paid;
float remaining_balance = balance - principal_paid;

These values also remain static for each iteration of the loop.

Perhaps what you're looking for is to incorporate the variable that is being changed for each iteration of the loop into the equations; then values will change each time the loop cycles.