Question

19. Monthly Payments The monthly payment on a loan may be calculated by the following formula: Rate (1Rate) ((1 Rate)N - 1) P

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

//header files

#include<iostream>

#include<math.h>

#include<iomanip>

using namespace std;

int main()

{

//setting precision to two decimal point

cout<<fixed<<setprecision(2)<<endl;

//variables

double LA, MIR, MP, payment, IP, AIR;

int NOP;

//accept the user data

cout<<"Enter the loan amount: ";

cin>>LA;

cout<<"Please enter annual interest rate as percent: ";

cin>>AIR;

cout<<"Please enter number payments: ";

cin>>NOP;

//calculate monthly interest

MIR = AIR/(12*100);

//formula to calculate montly interest rate

MP = (MIR * pow((1+MIR), NOP))/((pow((1+MIR), NOP)-1)) * LA;

//calculate total payment

payment = NOP * MP;

//cal Interest paid

IP = payment -LA;

//displa the output

cout<<"Loan Amount: "<<LA<<endl;

cout<<"Monthly Interest Rate: "<<MIR<<endl;

cout<<"Number of Payments: "<<NOP<<endl;

cout<<"Monthly Payment:$"<<MP<<endl;

cout<<"Amount Paid Back:$"<<payment<<endl;

cout<<"Interest Paid: $"<<IP<<endl;

return 0;

}

Filtestimain.exe Enter the loan amount: 1880e Please enter annual interest rate as percent: 12 Please enter number payments:

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
19. Monthly Payments The monthly payment on a loan may be calculated by the following formula:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT