Ruby 中的循環用於執行相同的代碼塊指定的次數。 ... #!/usr/bin/ruby $i = 0 $num = 5 while $i < $num do puts("Inside the loop i = #$i" ) $i +=1 end.
確定! 回上一頁