On Thu, Mar 13, 2008 at 8:20 PM, fecress <[EMAIL PROTECTED]> wrote:
> Please help me!!
>  How do I sort rand() generated numbers to determine minimum, maxmum,
>  average values.
>  Below is my code which is not working on minimum and maximum values

Did you read my other reply on this topic?
Your problem is that each time you call rand () it will return a
DIFFERENT random number.
So you have to store the random number on each iteration of the for
loop, and then use that variable to do your calculations.
For the average, you'll need to add up the numbers, and then divide it
with the count (how_many).

-- 
Tamas Marki

Reply via email to