Calculating the High and Low of it all
#6
That's more to the point, as Dim didn't ask for them to be ranked, just pick out the lowest and the highest.

If you don't want to seed it, just do...

Code: (Select All)
FOR i = 1 TO 100
    HL = RND
    IF HL < low OR i = 1 THEN low = HL
    low = (_ROUND(low * 100000)) / 100000
    IF HL > high OR i = 1 THEN high = HL
    high = (_ROUND(high * 100000)) / 100000
NEXT
PRINT low, high
Reply


Messages In This Thread
RE: Calculating the High and Low of it all - by Pete - 10-18-2022, 07:57 PM



Users browsing this thread: 4 Guest(s)