Skip to content

Instantly share code, notes, and snippets.

@nuna
Created September 9, 2010 03:52
Show Gist options
  • Save nuna/571330 to your computer and use it in GitHub Desktop.
Save nuna/571330 to your computer and use it in GitHub Desktop.
# from Ruby技術者認定試験公式ガイド pp169
even_number = 101 % 2 == 0
if even_number == true
p "偶数"
elsif
p "奇数"
end
# 上のプログラムは下と同じ
even_number = 101 % 2 == 0
if even_number == true
p "偶数"
elsif p "奇数"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment