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
'QUADRATIC' | {This will be the name of the program} |
"A"?![]() |
{" is in ALPHA} {? is in
PRGM} {![]() |
"B"?![]() |
|
"C"?![]() |
|
(B^2-4![]() ![]() ![]() |
{![]() |
D<0 ![]() |
{![]() |
((-B+![]() ![]() ![]() |
{The ![]() |
((-B-![]() ![]() ![]() |
{The second - is a subtraction sign} |
"SOLUTIONS" | |
E![]() |
{![]() |
F![]() |
|
Goto 2 | |
Lbl 1 | {Lbl is in PRGM under JMP} |
"NO REAL SOLUTIONS" | |
Lbl 2 |
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.
To see the second solution, you need to hit EXE
.