Data update
This commit is contained in:
parent
52a6ef48dd
commit
157b70a810
604 changed files with 14253 additions and 2100 deletions
|
|
@ -2,7 +2,7 @@ BEGIN # sleeping beauty problem - translated from the Wren sample #
|
|||
PROC sleeping beauty = ( INT reps )REAL:
|
||||
BEGIN
|
||||
INT wakings := 0, heads := 0;
|
||||
FOR i TO reps DO
|
||||
TO reps DO
|
||||
wakings +:= 1;
|
||||
IF next random < 0.5 THEN # [0..0.5) = heads, [0.5..1.0) = tails say #
|
||||
heads +:= 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue