Lee_assig2 - double R=P(1-pow(1 r/m-m*t cout<<"The...

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<< "The total payment is: "<< total payment<<endl double total payment=R*12*t cout<< "The total interest is: "<< total interest<<endl double ti=tp-P << endl return 0 }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online