How to build an equation solver for the standard form (Ax + By = C)





Note: I couldn't use the Sto key in this writing because it's output character on the calculator screen is not a valid character in HTML. As close as I could come to this was this: ->. Whenever you see -> press the Sto key. (It is right above ON.)


This code is designed to work on the TI-82, TI-83, TI-83+, and TI-83+SE. When using the 83 or higher, you can find all of these commands and more sorted alphabetically in the catalog, making this a little easier. For the all users, look in the prgm editor, format menu, and draw menu. I did all I could to make this code as easy to read as possible. I also try to walk you through the code. Good luck.

First, you'll need a program to hold this information. Go to prgm, then choose NEW. The editor will ask you for a name. For out purposes, let's name it STRDFORM.

After you name your program you need ot place code in it to make it function properly.

The first lines of your code should get the calc ready to display text. Use these lines:

   	:Clearhome
   	:Cleardraw
   	:Axisoff
   	

These get the calc ready for display. Cleardraw clears the graph, Clearhome clears the home screen, and Axixoff turn the Axis on the graph off, so that they will not fight with your text.

Next, you need to give the user a hint as to what you want. For that, use this line:

	:Disp "STANDARD FORM","AX + BY = C"
	

This displays two lines of text. The first line tells the user what the program is. The second dispalys what it will want.

On the next line, it's time for input. This code will get the variables the program needs to work.

	:Prompt A
	:Prompt B
	:Prompt C
	

The prompt commad displays a variable you specify, with a "?" next to it. It then takes whatever value the user types in, and stores it to the pormpted variable when they press ENTER. This code prompts for A, B, and C.

The next step in the program is to perform calculation. The software should take the data the user entered and turn it into the values they want. To od that, use these command lines:

	:C/A->D
	:C/B->E
	:A*1->F
	:C-F->G
	:G/B->G
	

This code works the equation in the same way that a person solving the equation would. (This is rare in the BASIC world because most equations have too many variables to solve programatically.) The final thing to do with this code is to make output. Pay close attention to the next lines of code because several objects will be embedded with each other (sorry.).

	:Text(1,1,"(",D,",0)")
	:Text(9,1,"(0",E,")")
	:Text(18,1,"(1,",G,")")
	:Pause
	:Cleardraw
	:Clearhome
	:Disp
	

This final section of code displays the output to the user. It uses the text command to place text on the graph. After that, it pauses and waits for the user to press enter. After that, it clears the graph and home screen. It then uses Disp to return the program to the home screen.



The program will do something like this when it is ran. [Note that I made a slightly different version of the software. In my version, the output as text is on one line. In the version you built, you 1-up my outdated version by displaying the text on 3 lines like a real T-table.]