Skip to content

Instantly share code, notes, and snippets.

@Bablzz
Created Oct 21, 2019
Embed
What would you like to do?
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