Skip to content

Instantly share code, notes, and snippets.

@AlisonACross
Created February 1, 2017 00:34
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 AlisonACross/23d3dcc840390f5221dbaec28f9cd34b to your computer and use it in GitHub Desktop.
Save AlisonACross/23d3dcc840390f5221dbaec28f9cd34b to your computer and use it in GitHub Desktop.
First Ruby Program
print "Do you like jokes? (enter 1 for yes, 0 for no): "
answer = Integer(gets)
if (answer == 1)
print "Great! How many programmers does it take to change a light bulb? None, thats a hardware problem!"
elsif (answer == 0)
print "Too bad. Whats the object-oriented way to become wealthy? Inheritance."
else
print "You dont know how to follow directions, do you?"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment