Sha256: d5e87912ae0632f84dfdcd142379197f66908653c6be95ef9649696f9cfefe6a

Contents?: true

Size: 799 Bytes

Versions: 6

Compression:

Stored size: 799 Bytes

Contents

2 PRINT TAB(34);"DICE"
4 PRINT TAB(15);"CREATIVE COMPUTING  MORRISTOWN, NEW JERSEY"
6 PRINT:PRINT:PRINT
10 DIM F(12)
20 REM  DANNY FREIDUS
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 TO"
60 PRINT "'ROLL' THE DICE.  WATCH OUT, VERY LARGE NUMBERS TAKE"
70 PRINT "A LONG TIME.  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(1)+1)
150 B=INT(6*RND(1)+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 V=2 TO 12
210 PRINT V,F(V)
220 NEXT V
221 PRINT
222 PRINT:PRINT "TRY AGAIN";
223 INPUT Z$
224 IF Z$="YES" THEN 80
240 END

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
basic101-1.0.2 test/integration/tests/basic_computer_games/dice.bas
basic101-1.0.1 test/integration/tests/basic_computer_games/dice.bas
basic101-1.0.0 test/integration/tests/basic_computer_games/dice.bas
basic101-0.4.0 test/integration/tests/basic_computer_games/dice.bas
basic101-0.2.0 test/integration/tests/basic_computer_games/dice.bas
basic101-0.1.0 test/integration/tests/basic_computer_games/dice.bas