The program is an illustration of loops, and loops are used for iterative purposes
The main program is not given, so I will write the new program from scratch.
The program written in C++, where comments are used to explain each action is as follows:
#include<iostream>
using namespace std;
int main(){
//This declares the required variables
float monthlyPayment, rate, principalAmount, f;
int years; f=1;
.................
See attachment for the complete program
}
Read more about loops at:
https://brainly.com/question/24833629