我想在每次循环迭代中增加我的步长值,但我的解决方案不起作用.
n=1 (0..100).step(n) do |x| puts x n+=1 end
有没有办法改变"n"或者我必须使用"while循环"或其他?
ruby loops
loops ×1
ruby ×1