View Single Post
Old 09-26-2006, 05:08 PM   #2 (permalink)
Ken11235
 
Contributor

Join Date: Jul 2006

Posts: 84

Ken11235

Default

The best way to do this is probably just have two variables: a counter and a total. Make their scope module level (declared at the top). When the user inputs a number, add it to the total and increment the counter. When a user wants to see the average, just divide total by counter.
Ken11235 is offline