無論是while、until、for或是迭代器,都可以搭配break、next與redo來控制流程。例如: # encoding: Big5 loop do print "輸入數字:" number = gets.to_i
確定! 回上一頁