I am using x = int(rnd(1)*2) to flip a coin..
like this:
flip a coin heads=0 tails=0 count=0 max=0
a: run = 0
b: save old coin, flip a new coin count = count + 1 if new coin is heads then heads = heads + 1 else tails = tails + 1 if old coin <> new coin goto a run = run + 1 if run <= max goto b print count,run,heads,tails max = run if max < 25 goto b
so far I have flipped 12,081,568 coins and only have had 18 in a row (max = 18)
I run the same program on my linux machine and 18 occurs at only 800,000 and by 28,000,000
the max=20. topping out at 26,671,835 to reach 25. written in C, using random function.
So the apple basic program is running many many more flips to get to the run of 25...
??!!??
-- Apple2list is sponsored by <http://lowendmac.com/> and...
/ Buy books, CDs, videos, and more from Amazon.com \ / <http://www.amazon.com/exec/obidos/redirect-home/lowendmac> \
Support Low End Mac <http://lowendmac.com/lists/support.html>
Apple2list info: <http://lowendmac.com/lists/apple2.html> --> AOL users, remove "mailto:" Send list messages to: <mailto:[email protected]> To unsubscribe, email: <mailto:[EMAIL PROTECTED]> For digest mode, email: <mailto:[EMAIL PROTECTED]> Subscription questions: <mailto:[EMAIL PROTECTED]> Archive: <http://www.mail-archive.com/apple2list%40mail.maclaunch.com/>
iPod Accessories for Less at 1-800-iPOD.COM Fast Delivery, Low Price, Good Deal www.1800ipod.com
