The following is a program that will solve quadratic equations with real answers (Not imaginary, those will give errors). It demonstrates the use of mathematic commands within programs. Note: Everything in green are comments. Do not type comments into your calculator; they just let you know what a command is doing.
Program: "QUAD"
:ClLCD
:Disp "Quadratic Solver v1.0","","Ax²+Bx+C" Program title and equation format
:Prompt A,B,C Gets the three coefficients from the user
:-B/2A+√(B²-4A*C)/2A->D Calculates the first answer and stores it to D
:-B/2A-√(B²-4A*C)/2A->E Calculates the second answer and stores it to E
:ClLCD
:Disp "The Answers are:",D,E Displays the answers contained in D and E
This is a screenshot of the program in action:
Please close this popup window when you are finished to return to Chapter 3