Created
September 12, 2021 21:41
-
-
Save debugging/3b0f2eabec376a426c4f7419f68b3da7 to your computer and use it in GitHub Desktop.
Compound 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
// compound growth calculator | |
val principal = 25000 | |
val rate = 0.01 | |
val n = 1 | |
val t = 20 | |
val total = principal * Math.pow(1 + (rate/n), n*t) | |
println(total) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment