Develop a Loan Calculator to calculate and display a list of monthly payments for a loan.
The user will be asked to enter the loan amount and the number of payments. The program will calculate the monthly payment for APR ranging from 3% to 10% with an increment of 0.25%. Hence, the APR will be 3%, 3.25%, 3.5%, 3.75%, 4%, 4.25%, 4.5%, 4.75%, 5%, ............. 10%.
I dont know how to do this exercise i have done a loan calulater as seen below but it dont know how to use it with this exercise. Please some one help me
using namespace std;
// Function propotype for the pow function is: double pow(double, double)
double payment, loan, apr, temp;
cout << "Please enter the loan amount (no $ or comma): ";
cin >> loan;
cout << "Please enter the interest rate (no % sign): ";
cin >> apr;
cout << "Please enter the number of payments: ";
cin >> term;
temp = pow((1.0 + apr/1200.0), (double) term);
payment = loan * (apr/1200.0) * temp / (temp - 1.0);
cout << "The monthly payment is: " << payment << endl;
} // main