Lee_assig2 - double R=P/((1-pow((1+r/m)),(-m*t)))...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include<iostream> #include<cmath> using namespace std int main () { int R,P,r,m,t cout<< "Please enter the interest rate: " cin>> r r=r/100 cout<< "Please enter the loan amount: " cin>> P cout<< "Please enter the number of years you would like to pay off the loan: " cin>> t cout<< "The monthly payment is: "<< monthly payment<<endl
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: double R=P/((1-pow((1+r/m)),(-m*t))) cout&lt;&lt; &quot;The total payment is: &quot;&lt;&lt; total payment&lt;&lt;endl double total payment=R*12*t cout&lt;&lt; &quot;The total interest is: &quot;&lt;&lt; total interest&lt;&lt;endl double ti=tp-P &lt;&lt; endl return 0 }...
View Full Document

Ask a homework question - tutors are online