a = [] 5.times do a.push(rand(0...20)) end print("#{a}\n") s = 0 a.each do |i| s += i end print s