Re: TI-85 Programming Question
[Prev][Next][Index][Thread]
William Chen wrote:
>
> excel98@norfolk.infi.net wrote:
> >
> > Can anyone explain to me how to use the rand function. I simply want it to
> > randomly output a number from one to ten. Or randomly output a variable.
> > Can someone help me out with this.
>
> To use it just type in:
>
> rand( Any number )
>
> In your case:
>
> int (rand(10))
>
> Hope this helps.
I wonder if anybody here knows what a 'TI-85 Graphics Calculator
Guidebook' is? They're standard with each TI sold.. And they're not just
in there for packaging material. From page 3-6 in the book:
"rand (random number) generates and returns a random number greater than
0 and less than 1. To control a random number sequence, first store an
integer seed value in rand; for example 0->rand. If you store 0 to rand,
the TI-85 uses the factory-set seed value. When you reset the TI-85,
rand is set to the factory seed.
"For example, 0->rand:rand*3 always returns 2.83079220478."
So storing an integer into rand will affect what comes out..
<pre>
--
Greg Hill
http://braves.bhs.davis.k12.ut.us/
ghill@lab.tech.bhs.davis.k12.ut.us
greg_hill@email.state.ut.us
</pre>
References: