Your average is going to change each time around the loop.
Maybe one loop to calculate the sum, then calculate the average for the whole array (once), then another loop for the lesser, greater counts.
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Offline 7,164 posts
since Dec 2005