Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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