home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 78 / 078.d81 / journal (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  835b  |  31 lines

  1. 5 poke53281,0:poke53280,0:print"[147][159]"
  2. 10 pr$(0)="heads":pr$(1)="tails"
  3. 20 nr=0: rem nr=number right
  4. 30 pr=0: rem pr=prediction
  5. 40 r=0:  rem r =random value
  6. 50 he=0: rem he=heads tally
  7. 60 ta=0: rem ta=tails tally
  8. 70 lf=0: rem lf=last flip, 0 = heads,                              1 = tails
  9. 80 x=rnd(-ti)
  10. 90 fort=1to100
  11. 100 pr=0:if he>ta then pr=1
  12. 110 if he=ta then pr=(lf+1)and1
  13. 120 r=rnd(1)
  14. 130 ifr<.5 then lf=0:he=he+1
  15. 140 ifr=>.5 then lf=1:ta=ta+1
  16. 150 ifpr=lf then nr=nr+1
  17. 160 printttab(6)"[208]rediction: "pr$(pr)
  18. 170 printtab(10)"[210]esult: "pr$(lf)
  19. 180 print,,"[206]umber heads="he
  20. 190 print,,"[206]umber tails="ta"
  21. 200 [153],,"(NULL)umber right="nr
  22. 210 [130]
  23. 300 [153]"cont      ((NULL)cont)ry it again   ((NULL)cont)enu":[151]198,0
  24. 310 [161]a$:[139]a$[179][177]"t"[175]a$[179][177]"m"[167]310
  25. 320 [139]a$[178]"t"[167][138]
  26. 330 [159]15,8,15,"r0:hello connect=hello connect":[132]15,er:[160]15
  27. 340 [139]er[179][177]63[167][128]
  28. 350 [153]"loadstopload"[199](34)"hello connect"[199](34)",8"
  29. 360 [153]"run"
  30. 370 [151]631,13:[151]632,13:[151]198,2:[128]
  31.