Question: Suppose you are buying a house. Write a program to calculate your monthly mortgage payment. The required inputs are: P : The principal loan amount

Suppose you are buying a house. Write a program to calculate your monthly mortgage payment. The required inputs are: P : The principal loan amount i : The annual interest rate (5%=0.05) y : The number of years over which to pay back the loan. Your monthly interest rate is therefore: r = i /12 and the number of payments is n = y 12(because you are making 12 monthly payments per year.) The formula for the monthly mortgage payment is then: Principal loan amount: 300000 Annual interest rate : 0.05 Loan term (years) : 30 Monthly payment : 1610.46 Demonstrate your program with the above example and at least one other example. Copy and paste your

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!