◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ' This example uses the RANDOMIZE statement to seed and reseed the random ' number generator and the RND function to simulate rolling a pair of dice. RANDOMIZE TIMER ' Use the timer as seed for the number generator DO ' Simulate rolling two dice using RND D1 = INT(RND * 6) + 1 D2 = INT(RND * 6) + 1 CLS ' Clear the screen and report the roll PRINT "You rolled a"; D1; "and a"; D2; "for a total of"; D1 + D2 INPUT "Roll again (Y/N)"; Resp$ PRINT LOOP UNTIL UCASE$(MID$(Resp$, 1, 1)) = "N" END