Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@renatoathaydes
Created February 16, 2015 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renatoathaydes/906b369f576fc496d2c4 to your computer and use it in GitHub Desktop.
Save renatoathaydes/906b369f576fc496d2c4 to your computer and use it in GitHub Desktop.
Mortage calculator
totalValue = 4500000
pantbrev = 1534900
///////////////////////////////////
fromApt = 699500
lagFart = 0.015 * totalValue
toPay = 0.15 * totalValue + 0.02 * (Math.max(0, totalValue - pantbrev)) + lagFart
println "Total to pay $toPay"
println "After considering money from apartment: ${toPay - fromApt}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment