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

A bank offers finance of a house cost for years for a certain interest rate. You

ID: 3680864 • Letter: A

Question

A bank offers finance of a house cost for years for a certain interest rate. You are asked to calculate the monthly payment the customer has to pay throughout the whole period. The interest rate is given per year, and applied by the bank year by year. Write an algorithm that reads the house final cost and the interest rate then calculates and prints the house final cost and the monthly payment. For example if the house initial cost is 100000 AED and the interest rate is 10%, then after 5 years the loan becomes 100000 + 100000*0.10 = 110000 AED at the end of the first year 110000 + 110000*0.10 = 121000 AED at the end of the second year 121000 + 121000*0.10 = 133100 AED at the end of the third year And so on.

Explanation / Answer

Here is the algorithm as per your requirements.

Instead of calculating interest rate using your formilae you can use p*(1+r/100) to the power n

but I have not used the formulae because it is out of your interest.

Answer:
Algorithm for payment calculation.
1) Declare variables amount, rateofinterest , interestamount, monthlypayment and totalamount
2) Accept input from the user into amount and rateofinterest.
3) Assign amount value to totalamount
4) calculate interest amount
interestamount = totalamount * rateofinterest / 100
5) calculate total amount
totalamount = interestamount + amount
6) repeat the steps 3 to 5 the number of years times i.e. 5 .
7) print totalamount as Final Cost
8) calculate monthly payment by deviding the total amount with number of years
monthlypayment = totalamount / numberofyears i.e. 5
9) print monthlypayment

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