Vtech PreComputer Power Pad Plus User Manual - Page 45
Input Give Me A Number; N1, Input And Another; N2, Print I Will Add Them, C=n1+n2, Print
View all Vtech PreComputer Power Pad Plus manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 45 highlights
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 press ENTER press ENTER press ENTER press ENTER press ENTER Type RUN and press ENTER to see what happens. 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. The symbol > = means greater than or equal to. The symbol < = means less than or equal to. Here are some conditions: 5 < 10 20 > 10 They are both true because 5 is less than 10 20 is greater than 10 The IF statement has a condition either TRUE or FALSE. The computer evaluates the condition and decides that if a condition is TRUE it will do something for the TRUE condition. Take the following: IF A > 90 THEN PRINT "YOU ARE SMART" 41