Re: Die rolling program for TI-85?


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

Re: Die rolling program for TI-85?



Af608 wrote:
>
> Hi,
>         Does anyone know if a random die rolling program exists for the
> TI-85?  I'd like it to do rolls such as 1d6 or 3d6 and so on.  Thanks!
>
> --Af608
I don't know what 1d6 and 3d6 are, but you can make a program using the
ti-85's built-in random number generator that will pick a random number
between any two numbers.  Here's how:


Ordinarily, RAND (the built in ti85 random # generator), picks a number
between 0 and 1.  If you put RAND into this formula:


int ((UB-LB+1)*rand+LB)


you get numbers between UB (upper bound) and LB (lower bound).  If you
want all the decimals, leave off the INT statement or put in a ROUND(
command.  Hope this helped!


<pre>
--
--- Sam Lewallen --- e-mail to w7el@teleport.com ---
Computers are like drugs: Incredibly addictive, highly
expensive, and you keep having to buy more and better
     to remain at the same level of amusement.
</pre>


References: