Created
May 10, 2021 14:33
-
-
Save RahmatSaeedi/5d3967142404193813f8bd09b036a983 to your computer and use it in GitHub Desktop.
CodeSignal - Arcade - Intro - JS - depositProfit
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
function depositProfit(deposit, rate, threshold) { | |
return Math.ceil(Math.log(parseFloat(threshold)/parseFloat(deposit)) / Math.log(1 + parseFloat(rate)/100.0)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment