RosettaCodeData/Task/Integer-comparison/Brat/integer-comparison.brat

7 lines
270 B
Text
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
first = ask("First integer: ").to_i
second = ask("Second integer: ").to_i
when { first > second } { p "#{first} is greater than #{second}" }
{ first < second } { p "#{first} is less than #{second}" }
{ first == second } { p "#{first} is equal to #{second}" }