Skip to content

Instantly share code, notes, and snippets.

@siman-man
Last active May 15, 2019 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siman-man/d80686bbc2be82654cb242315f6544ee to your computer and use it in GitHub Desktop.
Save siman-man/d80686bbc2be82654cb242315f6544ee to your computer and use it in GitHub Desktop.
# '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
@siman-man
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment