RANDOM NUMBERS
The computer can perform other functions that your calculator most
likely cannot do. For example, your computer can pick random
numbers for you. Type the program below:
NEW
10 PRINT RND (0)
2O GOTO 10
R U N
RND is the command for generating random numbers. The infinite
loop in the program above will generate random numbers endlessly.
Remember to break the loop with the key. To make changes in
the program, you can just list the program and use the cursor keys to
insert characters, rather than retype entire lines. Try out the various
programs below:
10 PRINT RND (1)
RUN
10 PRINT RND (123)
RUN
10 PRINT RND (50)
RUN
10 PRINT RND (50000)
RUN
All four variations of line 10 generate random numbers between 0 and
1. The decimal point is always before the first digit in a random number.
The few random numbers that have a number on the left side of the
decimal point are still between 0 and 1 but are so small that the com-
puter has written them in scientific notation.
50
Order of Mathematical Execution
Computations
in parentheses
Exponential
functions
Multiplication
Division
Addition
Subtraction
In order of appearance
from left to right
In order of appearance
from left to right
1.
2.
3.
4.
( )
^
*
/
+
Summary of Contents for 65XE
Page 1: ...ATARI 65XE PERSONAL COMPUTER OWNER S MANUAL TM...
Page 3: ...ATARI 65XE PERSONAL COMPUTER TM...
Page 6: ...Part 1 GettingStarted 1...
Page 9: ...4...
Page 23: ...18...
Page 25: ...20...
Page 32: ...Part 2 Programming withATARI BASIC 27...
Page 33: ...28...
Page 59: ...54...
Page 69: ...64...
Page 82: ...Part3 Appendices 77...
Page 83: ...78...
Page 97: ...92...
Page 105: ...100...
Page 125: ...120...
Page 126: ...121 Index...
Page 127: ...122...
Page 134: ...ATARI 1987 Atari Corp All Rights Reserved Printed in Taiwan C072018 001 REV B K l 2 1987...
Page 135: ......