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...
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
loan: $ 30,000.00 total payment: $500 APR(%): 8 part A: calculate the period rate assuming monthly...
loan: $ 30,000.00 total payment: $500 APR(%): 8 part A: calculate the period rate assuming monthly compounding partB: do the amortization schedule and use it to answer parts C and D partC: what is the life of your loan part D: what is the total interest payment over the life of the loan?
Calculate the monthly payment for loan amount of $350,000 using the following parameters: • 20 Year...
Calculate the monthly payment for loan amount of $350,000 using the following parameters: • 20 Year Loan, fully amortizing • Interest Rate of 3.29% What is the monthly payment amount (rounded to the nearest dollar)? a. $2,466 b. $2,276 c. $1,992 d. $1,713 Calculate the monthly payment for loan amount of $150,000 using the following parameters: • 30 Year Loan, fully amortizing • Interest Rate of 7.00% What is the monthly payment amount (rounded to the nearest dollar)? a. $...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT