id/email
password
forgot password
about | help | done | prefs | create account
CodingBat code practice

mortgage

Suppose we get a loan for "base" dollars, which increases by "interest" percent at the beginning of each month. We pay "payment" dollars at each month's end. How much do we still owe after "months" months have passed?

mortgage(40, 10, 10, 1) → 34.0
mortgage(100, 5, 10, 1) → 95.0
mortgage(100, 5, 10, 2) → 89.75

...Save, Compile, Run         

See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops

Forget It! -- delete my code for this problem 210

Copyright Nick Parlante 2006-10 - privacy