60 478
Assignments Done
Successfully Done
In April 2018

Answer to Question #14080 in C++ for shalenee

Question #14080
(financial application: loan amortization schedule c++). The monthly payment for a given loan pays the principal and the interest. the monthly interest is computed by multiplying the monthly interest rate and the balance (the remaining principal). the principal paid for the month is therefore the monthly payment minus the monthly interest. write a program that lets the user enter the loan amount, number of years, and interest rate, then displays the amortization schedule for the loan.
Expert's answer
#include <iostream>
#include <conio.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])

cout<<"Loan Amount: ";
int loanAmount;
double balance = loanAmount;
cout<<"Number of Years: ";
int numberOfYears;
cout<<"Annual Interest Rate In Percent: ";
double annualInterestRate;
double k;
cin>> k;
double monthlyInterestRate = annualInterestRate / 12;
double monthlyPayment = loanAmount * monthlyInterestRate / (1 - 1 / pow(1 + monthlyInterestRate, numberOfYears *
double totalPayment = monthlyPayment * numberOfYears * 12;

Monthly Payment: $%.2f", monthlyPayment);
Total Payments: $%.2f", totalPayment);


Payment # Interest Principal Balance
for (int month = 1; month <= numberOfYears * 12; month++) {
double monthlyInterest = monthlyInterestRate * balance;
double principal = monthlyPayment - monthlyInterest;
balance = balance - principal;

printf("%d $%.2f $%.2f $%.2f
", month, monthlyInterest, principal, balance);
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions