|
The OnePlus1 Program |
We call this program the OnePlus1 program because it displays the sum of 1+1+1+.... This program depends on variables. We spoke of variables earlier on in this page, now we will learn how to use them. First, a variable is a letter such as X that holds a numerical value. Variables on the TI-83 include A through Z and the Theta symbol which looks like this: . One can store numerical values into variables using the store command, represented by -> in this tutorial. This can be found (STO->) on the keypad right above the ON key.
:ClrHome :Lbl 0 :0->X :Lbl 1 :While 10 :Output(1,1,"1+1=" :Output(1,5,X :X+1->X :Goto 1
Run the program. You will see that the program is a loop; every time it runs through the program, the variable X increases by an increment of 1. This number is displayed and, since the program runs so quickly, the numbers roll over each other very quickly. The ClrHome command clears all data on the home screen (the screen in which one normally does equations). The command string 0->X sets the variable X to 0. Press the ON button to exit.
|
|
|