VTech Power Pad Precomputer Power Pad Plus User Manual page 46

Vtech precomputer power pad plus user's manual
Table of Contents

Advertisement

The A > 90 is a condition. The print "YOU ARE SMART" is the command given for the
true condition. In the above example, let's give A the value 80. Would the message be
printed? No, it would not be printed because the condition is false (80 is less than 90).
Let's try a program to compute the area of a rectangle.
Type:
NEW
10
INPUT "ENTER THE LENGTH";L press ENTER
20
INPUT "ENTER WIDTH";W
30
LET A=L*W
40
PRINT "THE AREA IS";A
50
INPUT "ANOTHER? (Y/N)";R$
60
IF R$="Y" THEN 10
70
PRINT "THAT'S ALL FOLKS!"
80
END
RUN
This program uses the INPUT statement to get values for numeric variables and prints
a computed result. It then prompts for a string variable and makes the decision to begin
again if the value typed in is a Y.
Here's another one.
Type:
NEW
10
INPUT "GIVE ME A NUMBER";A
20
INPUT "AND ANOTHER";B
30
PRINT "ADD, SUBTRACT, MULTIPLY OR DIVIDE"
40
PRINT "TYPE IN THE FIRST LETTER OF THE"
press ENTER
press ENTER
press ENTER
press ENTER
press ENTER
press ENTER
42

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents