Question

In: Computer Science

The monthly payment on a loan may be calculated by the following formula: Payment =    Rate *...

The monthly payment on a loan may be calculated by the following formula:

Payment =    Rate * (1 + Rate)N
((1 + Rate)N -1)

Rate is the monthly interest rate, which is the annual interest rate divided by 12. (12 percent annual interest would be 1 percent monthly interest.)

N is the number of payments, and

L is the amount of the loan.

Write a program that asks for these (Input) values then displays a report similar to:

Loan Amount:            $ 10000.00

Monthly Interest Rate:          1%

Number of Payments:             36

Monthly Payment:        $   332.14

Amount Paid Back:       $ 11957.15

Interest Paid:          $ 1957.15

Plz write a program for C++

Solutions

Expert Solution

Source Code:

Output:

Code in text format (See above images of code for indentation):

#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
/*main function*/
int main()
{
   /*variables*/
   double Rate,N,L,Payment,total;
   /*read loan payment from user*/
   cout<<"Enter Loan Amount: ";
   cin>>L;
   /*read interest rate from user*/
   cout<<"Enter Monthly Interest Rate: ";
   cin>>Rate;
   /*read number of payments from user*/
   cout<<"Enter Number of Payments: ";
   cin>>N;
   Rate=Rate/100;
   /*calculate monthly payment*/
   Payment=L*((Rate*(pow(1+Rate,N)))/(pow(1+Rate,N)-1));
   /*total amount to be paid*/
   total=Payment*N;
   cout<<fixed<<setprecision(2)<<endl;
   /*print report*/
   cout<<"Loan Payment:\t$"<<L<<endl;
   cout<<"Monthly Interest Rate:\t"<<Rate*100<<"%"<<endl;
   cout<<"Number of Payements:\t"<<N<<endl;
   cout<<"Monthly Payment:\t$ "<<Payment<<endl;
   cout<<"Amount Paid Back:\t$ "<<total<<endl;
   /*calculate interest and print*/
   L=total-L;
   cout<<"Interest Paid:\t$ "<<L;
  
   return 0;
}


Related Solutions

Use coding langues C ++ The monthly payment on a loan may be calculated by the...
Use coding langues C ++ The monthly payment on a loan may be calculated by the following formula: Payment = Rate × ( 1 + Rate ) N/ ( ( 1 + Rate ) N − 1 ) Rate is the monthly interest rate, which is the annual interest rate divided by 12. (12 percent annual interest would be 1 percent monthly interest.) N is the number of payments, and L is the amount of the loan. Write a program...
On a 30-year, fixed-rate loan with a monthly payment of $1,000 and an interest rate of...
On a 30-year, fixed-rate loan with a monthly payment of $1,000 and an interest rate of 9%, what is the outstanding balance due on the loan with after the borrower has made 18 years of payments?
2. A What is the monthly payment amount on a $100,000 home loan if the rate...
2. A What is the monthly payment amount on a $100,000 home loan if the rate is 8.0% APR, and the loan is made for a 15-year period? B A four-year investment requires annual deposits of $300 at the beginning of each year. The deposits earn 6% per year. What is the investment’s future value? Remember, the deposits are made at the beginning of each year (annuity due).
The formula m = 12,000 + 12,000rt 12t  gives Keri's monthly loan payment, where r is...
The formula m = 12,000 + 12,000rt 12t  gives Keri's monthly loan payment, where r is the annual interest rate and t is the length of the loan, in years. Keri decides that she can afford, at most, a $275 monthly car payment. Give an example of an interest rate greater than 0% and a loan length that would result in a car payment Keri could afford. Provide support for your answer.
Compute the monthly payment for a $133,440 home loan. The stated interest of the loan is...
Compute the monthly payment for a $133,440 home loan. The stated interest of the loan is 5% with monthly payments. The loan amortization is over 25 years.
Find the monthly payment for a 25-year fixed-rate loan of $200,000 at 5% annual interest.
Find the monthly payment for a 25-year fixed-rate loan of $200,000 at 5% annual interest.
5)What is the monthly payment on a 15 year, $350,000 mortgage loan, where interest rate is...
5)What is the monthly payment on a 15 year, $350,000 mortgage loan, where interest rate is 3% per year, Compounded annually Compounded monthly Compounded daily What are effective annual rates for 1,2, and 3 above?
Suppose you are offered a bullet loan. The payments are made monthly and they are calculated...
Suppose you are offered a bullet loan. The payments are made monthly and they are calculated using a 30-year traditional mortgage. So, you have 5-year bullet. In this situation, you will make the payments for the 30-year traditional mortgage in the first 5 years, but the bullet payment is due after you make the 60th payment. Note that the bullet payment is the remaining principal of the loan which can calculated using amortization table, however, in addition, it is the...
loan amount - 1,200,000. terms(years) - 15 interest rate - 3.125% payment frequency - monthly Amortizing...
loan amount - 1,200,000. terms(years) - 15 interest rate - 3.125% payment frequency - monthly Amortizing Loan Assignment
If you borrowed $200,000 - what would your monthly loan payment be? Rate: 2.94 Time: 30...
If you borrowed $200,000 - what would your monthly loan payment be? Rate: 2.94 Time: 30 years If you borrowed $200,000 - what would your monthly loan payment be? Rate: 7.85 Time: 30 years Please show work / calculator button
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT