Created
February 16, 2015 20:07
-
-
Save renatoathaydes/906b369f576fc496d2c4 to your computer and use it in GitHub Desktop.
Mortage calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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