Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
the only way to go is to declare a counter, then for each element in the array, add the element's value to the counter and then divide the counter by the number of the elements in the array, or is there a quicker way?@Array = (3, 5, 7, 12,24);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get average value of array of numbers
by bruno (Friar) on Oct 15, 2009 at 14:08 UTC | |
by AnomalousMonk (Archbishop) on Oct 15, 2009 at 19:27 UTC | |
by swampyankee (Parson) on Oct 15, 2009 at 19:49 UTC | |
by Anonymous Monk on Oct 15, 2009 at 14:10 UTC | |
|
Re: Get average value of array of numbers
by arun_kom (Monk) on Oct 15, 2009 at 14:38 UTC | |
|
Re: Get average value of array of numbers
by gulden (Monk) on Oct 15, 2009 at 14:10 UTC |