Skip to content

Instantly share code, notes, and snippets.

@umar-siddiqui
Created December 21, 2017 07:37
Show Gist options
  • Save umar-siddiqui/4da78e6d8a023ead2fb192d508d9a6c5 to your computer and use it in GitHub Desktop.
Save umar-siddiqui/4da78e6d8a023ead2fb192d508d9a6c5 to your computer and use it in GitHub Desktop.
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