-
-
Save anonymous/1aae905b870b81aa85ff to your computer and use it in GitHub Desktop.
Ruby Simple Script
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
# 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