ruby常用操作
405 ワード
# -------if --------------
x=3
if x > 2
puts "x is greater than 2"
elsif x <= 2 and x!=0
puts "x is 1"
else
puts "I can't guess the number"
end
# -------for --------------
for i in 0..5
puts "Value of local variable is #{i} "
end
# ------- --------------
=begin ------- --------------
12321
=end