in the range m to n
(as
shown by the previous formula). In this program, the values
of m and n are set in line 10 for a given program
ru
n.
Note that these values can
be
negative.
In
the following example, the
printout
is
an unending sequence of ran-
dom
numbersbetween-50
and
+50.
(Press
STOP
to end the program.) A different
sequence
of
numbers
will
be
printed each time the program runs, since
-TI
pro-
vides a random
seed.
Two
other changes have been made for the previous program:
1)
the X
value returned from RND(-TI)
is
printed instead of the
TI
value. and
2)
the need for
the K-variable
wait
loop
is
eliminated by printing sets of numbers across the line
in continuous line format.
which
slows the display scrolling compared to single-
column printing along the left-hand side of the screen.
10
t1=-513:
H=50
20
X=RND(-TI):PRIHT
X
30
FOR
1=1
TO
E:
40
C%=(H-M+l)~RHD(l)+M
50
PRINT
C%;
:NEXT 1
60
PRINT:
GOTO
;::0
RUN
E:.
27633(1E:5E-(16
-14
9
-34
-35
-47
-44
28
31
29
-8
-36
-28
-42 -28
15
14
7
-13
3
-8
8 41
19
-43
35
12
24
-7
-7
-21
-47
-32
-49
7
-49
28
-22 -17
-24
-12
7
27
1 11 9
-18
35
48
49
1
34
-46
-29 -43
29
-18
5
-30
2 8
-28
-13 -23
48
-15
-12
-45
26
44
-25
2
-9
4
27
50
33
-16 -43 -15
20
20
17
43
-18 -48
-38
24
-16
43
-50
36
-38
5 11
25
-30
6
-25
-47
32
10
42
-21
-47
-3E: -2E:
-8
16
-20
42-4
-34
36
-17
27
-8
-49
-6
-35
-19
19
-35
48
-42
36
-25
2
-49
37
47
38
-20
-25
32
-50
-5
-35
-35
17
-41
36
-19
4
33
-213
45
-7
48
-4
-33 -10
1
27
-39
-14
-38
-6
4
10
-5
17
2
49
(1
-40
-5
32
-5e
32
-24
-37 -38
22
-13 -27
-24
-30
35
le
b
16
-50
49
-49
50
43
38
-21
47
-43
28
32
-35
-18
-5
27
-46
-14
23
-49
-45
27
7
-35
1
46
-25
-8
20
-8
-12
-46
-31
-17
-18
-47
47
-49
18
47
17
40
-13
-413
48
-41
-33
5
-14
-46
45
-29
-37
22
17
42
33
-31
49
8
-4
36
37
11
18
29 25
(1
-1
2
-16
32
-29
-31
33
-9
-41
-4
47
12
-22
9
-48
-40
32
15
32
-50
3
-9
19
295