- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
10 MEDIAN=0
15 FOR Q=1 TO 10000 REM Lifes
20 TOTAL=0 REM Money
25 FOR I=1 TO 100
30 M=RND
35 IF M<0.5 THEN N=INT(10*RND)
40 IF M>=0.5 THEN N=-INT(10*RND)
45 TOTAL=TOTAL+N
50 NEXT I
55 MEDIAN=MEDIAN+TOTAL
60 PRINT Q,"MEDIAN="MEDIAN/Q
65 NEXT Q