if r>10
puts 'hello'
end
等價于
puts 'hello' if r>10
square=2
while square<10
square=square*square
end
等價于
square=2
square=square*square while square<10
if r>10
puts 'hello'
end
等價于
puts 'hello' if r>10
square=2
while square<10
square=square*square
end
等價于
square=2
square=square*square while square<10