Created
May 9, 2014 09:27
-
-
Save raysrashmi/a9267d4b473d32fafefd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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