Skip to content

Instantly share code, notes, and snippets.

@raysrashmi
Created May 9, 2014 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raysrashmi/a9267d4b473d32fafefd to your computer and use it in GitHub Desktop.
Save raysrashmi/a9267d4b473d32fafefd to your computer and use it in GitHub Desktop.
def solution(x,y,d)
sum = x+d
i=1
while true
if sum >= y
break
else
sum+= d
i+=1
end
end
i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment