Skip to content

Instantly share code, notes, and snippets.

Created June 4, 2015 01:04
Show Gist options
  • Save anonymous/1aae905b870b81aa85ff to your computer and use it in GitHub Desktop.
Save anonymous/1aae905b870b81aa85ff to your computer and use it in GitHub Desktop.
Ruby Simple Script
# Let's make a program in Ruby
print "Please enter a number: "
a = Integer(gets.chomp)
print "Now please enter a second figure: "
b = Integer(gets.chomp)
if a > b
print "#{a} is greater than #{b}"
elsif b > a
print "#{b} is greater than #{a}"
else
print "#{a} and #{b} are of equal value"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment