# -------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
ruby常用操作
最新推荐文章于 2024-07-18 17:53:23 发布