Loan calculator

A bit stumped on how I would write this as code

http://gyazo.com/ef1c7c6936c281b171c63e2de8530231

anyone have any ideas? its supposed to calculate the monthly payment for a loan

Last edited on
Something like this I imagine

1
2
3
4
5
6
7
8
9
int main() 
{ 
    double     N=1, 
	       P=1,
	       M=1,
               L=1;

	M=(((P/1200)*pow((1+P/1200),N))/(pow((1+P/1200),N)-1))*L;
}


You would have to #include <cmath> to use the pow() function.
Last edited on
thanks
Topic archived. No new replies allowed.