From: Taylor Lodge Date: 2009-05-06T04:37:23+09:00 Subject: Re: Min max program Ok after trying to write it this is what I got. I get a 28: syntax error, unexpected $end, expecting kEND >Exit code: 1 error though and I can't fix it any help thanks nums = Array.new(8) { rand(10000) } max = 0 min = 10001 nums.each do |num| if num > max num = max end nums.each do |num| if min < num num = min end nums.each do |num| sum += num end puts puts 'sum = ' + sum.to_s + '.' puts puts 'max = ' + max.to_s + '.' puts puts 'min = ' + min.to_s + '.' puts puts 'Average = ' + avge.to_s + '.' puts $end -- Posted via http://www.ruby-forum.com/.