RosettaCodeData/Task/Integer-comparison/Brat/integer-comparison.brat
2023-07-01 13:44:08 -04:00

6 lines
270 B
Text

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