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

7 lines
270 B
Plaintext

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}" }