-
-
Save anonymous/b745816ca7df2a4a92e3f59cae328108 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/ruby | |
a, b = gets.chomp.split(/ /).map(&:to_i) | |
sum = a + b | |
if a.between?(1, 9) && b.between?(1, 9) | |
puts sum | |
else | |
puts "Wrong input, a and b should be integers within the 0..9 range." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment