REM 3 dice thrown 5000 times - RG Weston, 20.02.2002 MODE0 OFF DIM T(5000), tally(18) PRINT"This program throws 3 dice 5000 times" PRINT'"Press 'Space Bar' repeatedly" TAB(57)"Statistics" GT=0 FOR n=1 TO 5000 a=RND(6) b=RND(6) c=RND(6) T(n)=a+b+c tally(T(n))=tally(T(n))+T(n) GT=GT+T(n) NEXT FOR x=3 TO 18 PRINTTAB(50)"score of ";x;" * ";tally(x)/x TAB(68)"= ";tally(x) NEXT PRINT'TAB(50)"Grand Total from 5000 throws " TAB(68)"= ";GT VDU5 FOR x=3 TO 18 MOVE x*50,0 DRAW x*50, tally(x)/x : PRINT;"*"x; NEXT G=GET RUN