DICE ROLLER by Adrian Mettler, April 1997
(kazmet@zapcom.net, http://www.zapcom.net/~kazmet/a)
DICEROLL:
This is a program for the TI-81* calculator that outputs
random numbers to simulate dice being rolled based on the number of
dice and how many faces they have.
HOW TO USE IT:
It asks you how many dice to roll and how many sides, and then gives
the value of each die and the total of all the dice rolled. (If you
input 0 or less as the number of dice to roll, it rolls 1 die.)
--
*(It should work for the other models in this series also, but might
need minor modifications.)
--start program code--
Prgm1:DICEROLL
:Disp "HOW MANY DICE?"
:Input X
:Disp "HOW MANY SIDES?"
:Input Y
:0 -> W (-> is the [STO>] key)
:Lbl L
:IPart RandY+1 -> Z
:Disp Z
:Z+W -> W
:DS<(X,1) (The "DS<(" instruction is in the PRGM CTL menu)
:Goto L
:Disp ""
:Disp W
--end program code (82 bytes)--