#include <math.h>

#include <string>

#include <iostream>

#include <stdlib.h>

using namespace std;

double MonthRate (double IntRate);

double MonthTerm (int Years);

int main()

{

double AmtofLoan, IntRate;

int Years;

cout << "Enter the loan amount in dollars: ";

cin >> AmtofLoan;

cout << "Enter the loan term in years: ";

cin >> Years;

cout << "Enter the interest rate as a percentage (5.75): ";

cin >> IntRate;

cout << endl;

cin.get();

cout << "Loan amount of $" << AmtofLoan << endl;

cout << "For a term of " << MonthTerm(Years) <<" months" << endl;

cout << "With an interest rate of " << IntRate<< "%" << endl;

double Mortgage = AmtofLoan * (MonthRate(IntRate) / (1-(pow((1+MonthRate(IntRa

cout << "Returns a monthly mortgage payment of $" << Mortgage << " per month." << endl;

cin.get();

}

double MonthRate (double IntRate)

{

return IntRate / (12 * 100);

}

double MonthTerm (int Years)

{

return Years * 12;

}