Skip to content

Instantly share code, notes, and snippets.

@Bablzz
Created October 21, 2019 10:34
Show Gist options
  • Save Bablzz/3afffd5bd2da149bcfc6a900495f9e40 to your computer and use it in GitHub Desktop.
Save Bablzz/3afffd5bd2da149bcfc6a900495f9e40 to your computer and use it in GitHub Desktop.
Bank deposite
years = 5
a = 1000
def bank(a, years)
i = 0
while i != years
b = (a * 0.1) + a
a = b
i += 1
end
a
end
puts bank(a, years)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment