Download Print this page

VTech PreComputer 2000 Manual page 28

Advertisement

You can use as many input statements as you need to get all the values into
your program
.
Try this:
NEW
10 INPUT "GIVE ME A NUMBER"; N1
20 INPUT "AND ANOTHER"; N2
30 PRINT "I WILL ADD THEM"
40 C=N1+N2
50 PRINT "THE ANSWER IS"; C
Type RUN and press
ENTER
to see what happens.
7. MAKING DECISIONS
The IF statement tells the computer that it has to make a decision. It does this
by comparing two numbers, or arithmetic expressions or string variables. It uses
special symbols to represent a condition
.
The symbol > means greater than.
The symbol
<
means less than.
The symbol
=
means equal to.
Here are some conditions~
5
<
10
20> 10
They are both true because
5 Is less than 1
o
20 Is greater than 10
27

Advertisement

loading
Need help?

Need help?

Do you have a question about the PreComputer 2000 and is the answer not in the manual?