proc mean . f[] r . for i = 1 to len f[] s += f[i] . r = s / len f[] . f[] = [ 1 2 3 4 5 6 7 8 ] mean f[] r print r