I wouldn't.
Simply increase a counter by one each time a valid number is entered and add this value to a variable sum. After the loop you can divide the sum by the counter and you get your result.
This will be faster and lighter on ram.
sDJh 39 Posting Whiz in Training
jingda commented: Correct:) +10
faroukmuhammad commented: thats what i 've in mind +4
Danarchy commented: Poster knows of what he speaks. 2 of my browsers got hijacked so it does and will happen. +7
gpdrums commented: very helpful - thank you for the generosity and hospitality +1