Add them up (for example in the same loop) and divide by how many elements your array happens to have.