Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Interest on a loan is paid on a declining balance. Write a program that takes a

ID: 3629531 • Letter: I

Question

Interest on a loan is paid on a declining balance. Write a program that takes a loan amount and interest rate as input and then outputs the monthly payments and balance of the loan until the loan is paid off. Assume that the monthly payment are one-twentieth (1/20) of the original loan amount, and that any amount in excess of the interest is credited toward decreasing the balance due. Thus, on a loan of $20,000, the payments would be $1,000 a month. If the interest rate is 10%, then each month the interest is one-twelfth (1/12) of 10% of the remaining balance. The first month, (10% of $20,000)/12 or $166.67, would be paid in interest, and the remaining $833.33 would decrease the balance to $19,166.67. The following month the interest would be (10% of $19,166.67)/12, and so forth. Also have the program output the total interest paid over the life of the loan.

Example 1:
Please enter the loan amount and interest rate: 10000 0.01

Monthly payment is $500
After 21 months, your loan will be paid off and the interest you have paid over
the life of the loan is $88.50

Explanation / Answer

please rate - thanks

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{double rate,loan,balance,tot,payment,extra,month,years,annual;
int count;
cout<<fixed<<showpoint;
cout<<setprecision(2);
cout<<setw(15);
cout<<"Enter amount of loan: ";
cin>>loan;
cout<<"Enter interest rate per year as a whole number: ";
cin>>rate;
rate=rate/100./12.;
payment=loan/20.;
cout<<" Loan amount:       $"<<loan<<endl;
cout<<"Interest rate:     "<<rate*12.*100.<<"%"<<endl;
cout<<"monthly payment: $"<<payment<<endl<<endl;;
count=0;
tot=0;
balance=loan;
do
{month=balance*rate;
   extra=payment-month;
   balance-=extra;
   tot+=month;
   count++;
   }while (balance>=payment);
count++;
month=balance*rate;
tot+=month;
payment=balance+month;
balance-=payment;
cout<<"Total interest paid over the life of the loan is $"<<tot<<endl;
cout<<"Number of months to completely pay back the loan is "<<count<<endl;
system("pause");     
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote