Created
December 21, 2017 07:37
-
-
Save umar-siddiqui/4da78e6d8a023ead2fb192d508d9a6c5 to your computer and use it in GitHub Desktop.
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
def profit(ex1, ex2, in_amt) | |
trd_amt = in_amt.to_f + in_amt.to_f * 0.01 | |
in_ripple = (in_amt.to_f/ex1.to_f) | |
final_amt = in_ripple*ex2.to_f | |
final_amt-trd_amt | |
end | |
profit(53,56,30000) | |
21461.45 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment