EasyManua.ls Logo

VTech PreComputer Prestige - Page 45

VTech PreComputer Prestige
93 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
43
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"
50 PRINT "ARITHMETIC OPERATION YOU WANT"
60 PRINT "ME TO DO FOR YOU"
70 INPUT R$
100 IF R$="A" THEN C=A+B : GOTO 200
110 IF R$="S" THEN C=A-B : GOTO 200
120 IF R$="M" THEN C=A*B : GOTO 200
130 IF R$="D" THEN C=A/B : GOTO 200

Related product manuals