interest is interestRate converted to a decimal (i.e. 7% = 0.0058) for arithmetic purposes. Is there a C function that accomplishes this?
totMonths is simply the term of the mortgage. I want the user to input their mortgage in years and let the program convert it to months.
I moved the variable declarations beneath the scanf() statements and fixed the totMonths (duh!
) and the program seems to work. However, I don't think the monthly payments are correct. For $100,000, 30 yr, at 6% it outputs $499.00/mo. However, web-based calculators give $599.50/mo. Obviously, something in the monthlyPayment algorithm is not quite right. Does the order of operators make sense?
Thanks for the help!