File DICE.BA (BASIC source file)

Directory of image this file is from
This file as a plain text file

10 DIM F(12)
20 REM DANNY FREIDUS
25 REMARKABLY TRANSLATED TO OS8 BASIC BY KAY R. FISHER ...DEC
30 PRINT "THIS PROGRAM SIMULATES THE ROLLING OF A"
40 PRINT "PAIR OF DICE."
50 PRINT "YOU ENTER THE NUMBER OF TIMES YOU WANT THE COMPUTER"
60 PRINT "TO 'ROLL' THE DICE.  WATCH OUT, VERY LARGE NUMBERS TAKE"
70 PRINT "A LONG TINE, IN PARTICULAR, NUMBERS OVER 5000."
80 FOR Q=1 TO 12
90 F(Q)=0
100 NEXT Q
110 PRINT\PRINT "HOW MANY ROLLS";
120 INPUT X
130 FOR S=1 TO X
140 A=INT(6*RND(0)+1)
150 B=INT(6*RND(0)+1)
160 R=A+B
170 F(R)=F(R)+1
180 NEXT S
185 PRINT
190 PRINT "TOTAL SPOTS", "NUMBER OF TIMES"
200 FOR Y=2 TO 12
210 PRINT Y,F(Y)
220 NEXT Y
222 PRINT\PRINT "TRY AGAIN";
223 INPUT Z$
224 IF Z$="YES" THEN 80
240 END



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search