Mr. Vizza's Class

Program for the Discriminant


    We know that the discriminant is given by

    This program is designed so that the user can enter a, b, and c for functions of the form ax^2+bx+c=0.  The calculator will automatically calculate the discriminant.

Bold text indicates a selection that can be made on the screen of the calculator.

Pink text indicates a button that must be depressed on the keypad.

Code

Description & Comments

PROGRAM : DISCRIM This is done by pressing PRGM and selecting NEW.  Use the appropriate buttons on the keypad to type the name of the program.  In this case we have named the program DISCRIM.   Press ENTER when done.
:Input "A?", A The colon will appear automatically at the beginning of every line.  The word Input is not typed at the key pad.  It is selected from a menu by pressing PRGM, followed by right arrow and then ENTER.
:Input "B?", B
:Input "C?", C
:B^2-4ACàD The à  is done by pressing STO>.
:If D<0 The < is gotten by pressing 2nd, followed by MATH, followed by 5.
:Then The word Then is not typed at the key pad.  It is selected from a menu by pressing PRGM, followed by 2.
:0àE
:End The word End is not typed at the key pad.  It is selected from a menu by pressing PRGM, followed by 7.
:If D=0 The = is gotten by pressing 2nd, followed by MATH, followed by ENTER.
:Then
:1àE
:End
:If D>0 The > is gotten by pressing 2nd, followed by MATH, followed by 5.
:Then
:2àE
:End
:Disp E The word Disp is not typed at the key pad.  It is selected from a menu by pressing PRGM, followed by right arrow, followed by 3.
Press 2nd, MODE to return back to the home screen.
To run the program press PRGM. Then select the program by using the up and down arrows.  Then press ENTER.

 

 

 

 

 

 

©2004 Thomas Vizza