#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double L, APR, Payment, N, brac1, brac2;
cout << "Please enter the loan amount: ";
cin >>L;
cout << "Please enter the APR: ";
cin >>APR;
cout << "Please enter the number of payments required: ";
cin>>N;
brac1 = 1.0 + APR/1200.0;
brac2 = 1.0 + APR/1200.0;
Payment = (L (APR/1200.0) * pow(brac1,N) ) / (pow(brac2,N) - 1.0);
cout<<"The monthly payment for the loan is "<<Payment<<endl;
return 0;
}
ineedhelp:( 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.