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 - Compound IF Statement


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

Input “ENTER A NUMBER : “, A
If (A > 5)  //Checks to see if the entered number is greater than 5. if so, it will execute the next two Output lines
Then
Output(3,5,A)   //outputs the entered number on screen in position row 3 column 5
Output(3,7,” > ”5”)   // outputs the result on screen in position row 3 column 7
End

If (A < 5)
Then
Output(3,5,A)
Output(3,7,” < ”5”)
End   //This End signifies the end of the first if statement

If (A = 5)
Then
Output(3,5,A)
Output(3,7,” = ”5”)
End

    Sample Output 1

ENTER A NUMBER : 8

          8 > 5
    Sample Output 2

ENTER A NUMBER : 3

          3 < 5
    Sample Output 3

ENTER A NUMBER : 5

          5 = 5