Siemens interview question

write the algorithm for finding mean of the array elements