Created
May 16, 2019 04:45
-
-
Save 284km/47aa2d0ee6d02a53e0252abb5b940f5c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
if n > -4782968 | |
puts 'Hello World' | |
else | |
puts 'Hello Ruby' | |
end | |
# Q2 | |
a, b = *[1, 2] | |
# if a == b | |
if a = b | |
puts 'Hello World' | |
else | |
puts 'Hello Ruby' | |
end | |
# Q3 | |
a = [0] | |
# if a[0] == 1 | |
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