Sorceress

haiku estimating 2

Sep 24th, 2018
755
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DIM T(20000) AS INTEGER
  2. h = 9543
  3. U = 1462
  4.  
  5.  
  6. FOR N = U TO U + 15
  7.   P = 0
  8.   FOR k = 1 TO 100
  9.     FOR i = 0 TO N: T(i) = 0: NEXT: UM = 0
  10.     FOR i = 1 TO h
  11.       m = INT(RND * N)
  12.       IF T(m) = 0 THEN UM = UM + 1
  13.       T(m) = 1
  14.     NEXT
  15.     IF UM = U THEN P = P + 1
  16.   NEXT
  17.   PRINT N; P / 100
  18. NEXT
RAW Paste Data