Last active
May 15, 2019 15:45
-
-
Save siman-man/d80686bbc2be82654cb242315f6544ee 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
# 'Hello World' を出力するようにプログラムを修正してください。 | |
# Q1 | |
n = 314 | |
if n > 4782968 | |
puts 'Hello World' | |
else | |
puts 'Hello Ruby' | |
end | |
# Q2 | |
a, b = *[1, 2] | |
if a == b | |
puts 'Hello World' | |
else | |
puts 'Hello Ruby' | |
end | |
# Q3 | |
a = [2] | |
if a[0] == 1 | |
puts 'Hello World' | |
else | |
puts 'Hello Ruby' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
解答
https://gist.github.com/siman-man/75c54d146cd70b92ac3b7e7bca71e077