Determining the monthly payment on a mortgage loan, C/C++ Programming

The following is the formula that can be used to complete that calculation:

Monthly Payment =

Monthly Interest Rate / (1 - (1 + Monthly Interest Rate) -Payment Interval)) * Principal


Monthly Interest Rate expressed as: Interest Rate / 100 / 12.

Payment Interval expressed as: Number of Years * Months of Year.

Principal is total amount of mortgage expressed without any comma separators or $ prefixing it.

An example for the above formula:

Rate: 7.75

Period: 360

Principal: $100,000

(7.75 / 100 /12) / (1 - (1 + 7.75 /100 / 12) ^ -(30 * 12) ) * 100000

The result of the above formula generates a value of 682.18. (Note that there is no formatting of the value.) The ^ is the symbol for an exponent that replaces the superscript in an actual formula.

In C++ you must declare variables for the rate, period, principal, and monthly payment. Each of these variables is prefixed with a data type. In this case the data types are limited to float for decimal-based numbers (interest rate and monthly payment) and int for whole numbers (payment interval and principal). NOTE: C++ in case sensitive so be sure the variable is the same in every instance.

Some of the Code:

          Payment = ?? / (1 - pow((1 + ??), - ?? * 12))  * ??;

          cout << "Your monthly mortgage payment is $" << ?? << endl  << endl;

[Remember to have #include





Monthly Payment


30 years




15 years




30 years




40 years




30 years



*Possible rounding error

Posted Date: 4/1/2013 3:26:39 AM | Location : United States

Related Discussions:- Determining the monthly payment on a mortgage loan, Assignment Help, Ask Question on Determining the monthly payment on a mortgage loan, Get Answer, Expert's Help, Determining the monthly payment on a mortgage loan Discussions

Write discussion on Determining the monthly payment on a mortgage loan
Your posts are moderated
Related Questions
find the c program to find area under the curvey=f(x)   #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area;

Q: But operator overloading makes class look ugly; isn't it assumed to make my code clearer? A: Operator overloading makes life simpler for the users of a class, not for develop

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Explain the different types of errors in PHP. Warnings, Notices and Fatal errors are the types of errors in PHP Notices: Notices signifies non-critical errors, i.e. ac

how to define the structures

It is a pointer accessible only in the member functions of a struct, class or union type. It points to the object for which the member function is called. Static member functions d

Mathematical Statements and assignments    Within C we can directly load up the variable from within the program using the mathematical expression equates (=) e.g.   a= 'h'

Ask questionByteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular

A: No. If they're utilized properly, they increase encapsulation. You frequently require splitting a class in half while the two halves will have distinct numbers of instances o

Define the Multi Dimensional Arrays? Consequently far we have considered arrays with only one dimension. It is as well possible to define an array which is having a 2-dimension