Skip to content

Instantly share code, notes, and snippets.

@Liooo
Created May 27, 2014 10:35
Show Gist options
  • Save Liooo/22a43715abbd6770adf4 to your computer and use it in GitHub Desktop.
Save Liooo/22a43715abbd6770adf4 to your computer and use it in GitHub Desktop.
debt = ARGV[0].to_i
pay = ARGV[1].to_i
interest_y = 18/100
interest_m = interest_y/12
month=0
while true
break if(debt<=0)
debt = debt - pay + (debt * interest_m)
month += 1
end
p month
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment