Homework #3

Homework #3 - /* MAE9: Homework #3, Fall 2008 Due on...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: /* MAE9: Homework #3, Fall 2008 Due on Monday, by 9pm, October 20 (a) Create a table for monthly payments of a house loans. Enter the price of a house from the keyboard, for example price = 450000. For annual interest rates: annual_rate = 0.06 to 0.08 with the increment of 0.002, compute by using the for-loop the monthly payments for 15-year, 20-year, and 30-year loans. Print the results in the table on the screen. (b) Copy the previous loop and modify it to calculate the total payments after 15, 20, and 30 years. Print results in another table on the screen. ........................................ Use the formula for equal-monthly-payments: month_pay = price * i* (1 + i)^n/((1 + i)^n - 1) where i= annual_rate/12. (monthly interest rate), and n = the total number of payments. The total payment for a given loan is: tot = n * month_pay To compute (1 + i)^n use pow(1.0 + i, (double)n) ..............................................................
View Full Document

This note was uploaded on 01/10/2009 for the course MAE MAE 9 taught by Professor Lubarda during the Fall '08 term at UCSD.

Page1 / 3

Homework #3 - /* MAE9: Homework #3, Fall 2008 Due on...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online