Technology
 

Input

From TI-BASIC Wiki - The free TI-BASIC encyclopedia

:Input String, variable

This displays the string, and waits for the user to input something. If the type of the input, the input is stored in the variable, and the program continues. If the input is not the type of the variable, Input ignores the input, the variable's value is not overwritten, and the program continues.

The variable may be of any type, except Ans.

[edit] Location

  • PRGM
  • I/O
  • 6:Input

[edit] Example

:ClrHome
:Input "NUMBER",X
:X+5Y
:Output(2,1,"YOUR NUMBER PLUS
:Output(3,1,"5 IS
:Output(3,6,Y

This program will ask the user to input a number. Once the number has been entered, the program will add 5 to it, and store it into a new variable. It will then display YOUR NUMBER PLUS 5 IS and then the number plus 5.

So,if your number was seven it would say

NUMBER7
YOUR NUMBER PLUS
5 IS 12