'=========================================================================== ' Subject: THEORY OF PROBABILITY Date: 01-25-97 (13:54) ' Author: Brian Mahocker Code: QB, QBasic, PDS ' Origin: Kain121182@aol.com Packet: ALGOR.ABC '=========================================================================== 'This is an experiment intended to document the theory of probobility. 'Use how u want. But if you do use this stuff in your other programs, 'please at least give me credit!! CLS : INPUT "What do you want the delay to be? : "; delay: COLOR 7 CLS : RANDOMIZE TIMER DO LOCATE 1, 1: PRINT "Number 1 :"; : COLOR 15: PRINT num1: COLOR 7 LOCATE 2, 1: PRINT "Number 2 :"; : COLOR 15: PRINT num2: COLOR 7 LOCATE 4, 1: PRINT "Times Equal :"; : COLOR 15: PRINT equal: COLOR 7 LOCATE 6, 1: PRINT "Numbers are currently"; : COLOR 15: PRINT apart; : COLOR 7: PRINT "apart with"; : COLOR 15: PRINT higher; : COLOR 7: PRINT "being the higher number" LOCATE 8, 1: PRINT "Highest amount ever being apart is"; : COLOR 15: PRINT highapart LOCATE 10, 1: COLOR 7: PRINT "Press "; : COLOR 15: PRINT "Pause/Break"; : COLOR 7: PRINT " at any time to pause count" LET pick = INT(RND * 2) + 1 IF pick = 1 THEN LET num1 = num1 + 1 IF pick = 2 THEN LET num2 = num2 + 1 IF pick = 3 THEN LET num1 = num1 + 1 LET time = 0: DO: LET time = time + 1: LOOP UNTIL time = delay IF num1 = num2 THEN LET equal = equal + 1 LET higher = 0 END IF IF num1 > num2 THEN LET apart = (num1 - num2) LET higher = 1 END IF IF num2 > num1 THEN LET apart = (num2 - num1) LET higher = 2 END IF IF apart > highapart THEN LET highapart = apart LOOP