#!/usr/local/bin/ruby pts = [198, 37, 66, 28, 33, 45, 46, 32, 2, 99] sum=0 for x in pts sum += x end printf("%f\n", sum.to_f/pts.length)