Trident HelpOpen the calculator

Programming

Make decisions with If, Then and Else

Write a program that tells you whether a number is negative, using If, Then, Else and End.

Open in Trident

If followed by a condition runs the next line only when the condition is true. To run several lines, put Then after the If and close the block with End. Else adds the lines to run when the condition is false.

Conditions use the TEST menu (2nd, MATH): =, ≠, >, ≥, <, ≤. Join them with and, or from the LOGIC tab.

Classic Graphing 84

Start on the main screen: Press 2nd then mode (QUIT) to get back to the home screen. Pressing clear on a menu also backs out of it.

  1. Create a program called SIGN: PRGM, left arrow, 1, then S, I, G, N (LN, x², TAN, LOG) and ENTER.

    prgm◀1lnx²tanlogenter
  2. Line 1, Prompt X: PRGM, right arrow, 2, then the X,T,θ,n key. ENTER.

    prgm▶2X,T,θ,nenter
  3. Line 2, If X<0: PRGM, 1 (If), X, then 2nd, MATH, 5 for < and 0. ENTER.

    prgm1X,T,θ,n2ndTESTmath50enter
  4. Line 3, Then: PRGM, 2. ENTER.

    prgm2enter
  5. Line 4, Disp "NEG": PRGM, right arrow, 3, lock letters, type the quotes and N, E, G, unlock. ENTER.

    prgm▶32ndA-LOCKalpha+logsintan+alphaSOLVEenter
  6. Line 5, Else: PRGM, 3. ENTER.

    prgm3enter
  7. Line 6, Disp "NOT NEG" (ALPHA 0 types the space). ENTER.

    prgm▶32ndA-LOCKalpha+log740logsintan+alphaSOLVEenter
  8. Line 7, End: PRGM, 7.

    prgm7
  9. Quit, run it, and answer X=? with (−) 5.

    2ndQUITmodeprgm1enter(−)5enter

You should seeNEG is shown, because −5 is less than 0. Press ENTER to run it again and try 3: you get NOT NEG.

Classic Graphing 84 key reference

Tips

Related guides