From: Jorrel Date: 2008-12-01T21:00:07+09:00 Subject: Re: Control Structures > 0.upto(a.to_i) do |num| > monkey.push((rand*5+1).to_i) > end or, since you're not using num anyway: a.to_i.times { monkey.push((rand*5+1).to_i) -- jorrel