Quadratic Formula - TI 81

Introduction
This program solves equations of the form Ax2+Bx+C=0 by using the quadratic formula.
 
If you have not used one of the programs posted on this website before, you should read through the information in the Intro to Programming section first.


The Program
:Disp "A" {Disp is in PRGM under I/O}
:Input A {Input is in PRGM under I/O}
:Disp "B"
:Input B
:Disp "C"
:Input C
:(B2-4*A*C)D {The arrow is STO}
:If D<0 {If is in PRGM under CTL} {< is in TEST }
:Goto 1 {Goto is in PRGM under CTL}
:((-B+(D))/(2A))E {The is square root}{The - is the negative sign}
:((-B-(D))/(2A))F {The second - is the subtraction sign}
:Disp "SOLUTIONS"
:Disp E
:Disp F
:End {End is in PRGM under CTL}
:Lbl 1 {Lbl is in PRGM under CTL}
:Disp "NO REAL SOLUTIONS"
:End


Running the program
 
You will be asked to enter values for A, B, and C according to the quadratic formula. To test your program try the following:
 
A=2, B=3, C=4. Your answer should be NO REAL SOLUTIONS.
 
A=5, B=4, C=-2. Your answer should be .348331477355, -1.14833147735.