Created
October 15, 2017 16:12
-
-
Save cxasper/5020d07093e7a2a6a344a2237519c4d7 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
n = gets.chomp | |
n = n.to_i | |
if (n%2==0) | |
case n | |
when 2 ... 6 | |
puts "Not Weird" | |
when 6 ... 21 | |
puts "Weird" | |
when 22 ... 101 | |
puts "Not Weird" | |
end | |
else | |
puts "Weird" | |
end |
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
n = gets.chomp | |
if (n.to_i%2==0) | |
case n | |
when 2 ... 6 | |
puts "Not Weird" | |
when 6 ... 21 | |
puts "Weird" | |
when 22 ... 101 | |
puts "Not Weird" | |
end | |
else | |
puts "Weird" | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment