Siemens Interview Question

write the algorithm for finding mean of the array elements