Sam Powell - ti 83/84 programs - Math/Computer Teacher - Northridge H.S. - Middlebury Indiana |Programming Page |TI 83/84 Programs |mrpowell.net |

TI 83/84 - IF Statement


Purpose : This program was designed to show how to use an if statement. It will allow the user to input a number and then check whether it is negative, positive, or zero. The text after each "/" are used for documentation purposes and are not needed in the program.

Disp "ENTER A"                                  /Displays the string "Enter A"
Input A                                                 /Stores the user input in the variable A
If A>0                                                  /Testing to see if input value is greater than zero
Then                                                    
Disp A, “IS POSITIVE”                       /If true, it will display the number and positive
ELSE
If A<0                                                  /otherwise it will check for a negative
Then
Disp A, “IS NEGATIVE”                     /If negative, it will display the number & negative
ELSE                                                   /otherwise it will check for a zero
Disp A, “IS ZERO”                              /If zero, it will display zero
END                                                    /End of if statement

    Sample Output 1

ENTER A
?8
                                 8
IS POSITIVE

    Sample Output 2

ENTER A
?-3
                                 -3
IS NEGATIVE

    Sample Output 3

ENTER A
?0
                                 0

IS ZERO