#include <iostream>
#include <math.h>
using namespace std;
int main()
{
double Payment, LoanAmt, InterestRate, MonthlyRate;
int NumberMonths;
cout<<"LOAN INTEREST CALCULATOR:"<<endl;
cout<<"Enter the loan amount: ";
cin>>LoanAmt;
cout<<endl<<"Enter the interest amount: ";
cin>>InterestRate;
MonthlyRate = InterestRate/1200;
InterestRate = InterestRate / 100;
cout<<endl<<"Enter the number of years: ";
cin>>NumberMonths;
NumberMonths = NumberMonths * 12;
Payment = (LoanAmt * MonthlyRate * pow ((1.0 + MonthlyRate), NumberMonths)) / pow((1.0 + MonthlyRate), NumberMonths -1; //monthly payment formula
cout<<endl<<"The monthly payment is: "<<Payment; //display monthly payment
return 0;
}