Skip to content

Instantly share code, notes, and snippets.

@Jauny
Created September 11, 2012 20:12
Show Gist options
  • Save Jauny/3701664 to your computer and use it in GitHub Desktop.
Save Jauny/3701664 to your computer and use it in GitHub Desktop.
def increment(x, y)
n = 1
while n < x
puts n
n += y
end
end
// with option to choose from where it starts
def increment(x, y, z)
while z < x
puts z
z += y
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment