Trident HelpOpen the calculator

Programming

Repeat steps with a For loop

Add the whole numbers from 1 to 100 with For( and End, and show the total 5050.

Open in Trident

For(I,1,100) runs the lines between it and the matching End once for each value of I: 1, 2, 3 and so on up to 100. A fourth number sets the step, for example For(I,1,99,2) for odd numbers only.

To add things up, start a total at 0 before the loop, add to it inside the loop, and show it after End.

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 SUM: PRGM, left arrow, 1, then S (LN), U (5), M (÷) and ENTER.

    prgm◀1ln5÷enter
  2. Line 1, 0→S: type 0, press STO→, then ALPHA, LN for S, and ENTER.

    0sto→alphaSlnenter
  3. Line 2, For(I,1,100): PRGM, 4 (For(), then I (ALPHA, x²), comma, 1, comma, 100, close the bracket and ENTER.

    prgm4alphaIx²,1,100)enter
  4. Line 3, S+I→S: the body of the loop adds I to the total.

    alphaSln+alphaIx²sto→alphaSlnenter
  5. Line 4, End: PRGM, 7 marks the end of the loop.

    prgm7enter
  6. Line 5, Disp S: PRGM, right arrow, 3, then S.

    prgm▶3alphaSln
  7. Quit and run it: 2nd, MODE, then PRGM, 1, ENTER.

    2ndQUITmodeprgm1enter

You should see1 + 2 + … + 100 = 5050.

Change 100 to another number to add up to that instead. The program runs in the background, so long loops never freeze the keypad. Press ON to stop one.

Classic Graphing 84 key reference

Tips

Related guides