a = [] 10.times do x=rand()-0.5 a.push(x) end print("#{a}\n") b = [] a.each do |i| if i > 0 b.push(i) end end print("#{b}\n")