The Rogue's

TI-86 BASIC Tutorial

~

Programming Practice for Chapter 3: Math and Variables

TI-86 BASIC Tutorial

~

Programming Practice for Chapter 3: Math and Variables

The following is a program that will solve quadratic equations withrealanswers (Not imaginary, those will give errors). It demonstrates the use of mathematic commands within programs. Note: Everything ingreenare 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,CGets the three coefficients from the user

:-B/2A+√(B²-4A*C)/2A->DCalculates the first answer and stores it to D

:-B/2A-√(B²-4A*C)/2A->ECalculates the second answer and stores it to E

:ClLCD

:Disp "The Answers are:",D,EDisplays 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