Re: how does rand work?


[Prev][Next][Index][Thread]

Re: how does rand work?



If I remember right, the rand command works in the following way:


         For example, generating a random number between 1 and 20:
                     20rand+1
20(sets max. range)rand(random# generator)=1(sets minimum range) <---Note:
the number generated is not necessarily an integer.


         If you want to display an integer, you would type something like
this:
                       int 20rand+1


Again, I haven't used that command for a while, so I could be wrong.  But
that's the way I remember it.


Tammy


References: