Program for Distance Formula
We know that the distance formula is given by
![]()
This program is designed so that the user can enter (x1, y1) & (x2,y2). The calculator will automatically compute the distance betwen these two points.
Bold text indicates a selection that can be made on the screen of the calculator.
Pink text indicates a button that must be depressed on the keypad.
| Code | Description & Comments |
|
| PROGRAM : DISTANCE | This is done by pressing PRGM and selecting NEW. Use the appropriate buttons on the keypad to type the name of the program. In this case we have named the program DISTANCE. Press ENTER when done. | |
| :Input "X1?", A | The colon will appear automatically at the beginning of every line. The word Input is not typed at the key pad. It is selected from a menu by pressing PRGM, followed by right arrow and then ENTER. | |
| :Input "Y1?", B | ||
| :Input "X2?", C | ||
| :Input "Y2?", D | ||
| : |
The à is done by pressing STO>. | |
| :Disp E | The word Disp is not typed at the key pad. It is selected from a menu by pressing PRGM, followed by right arrow and then ENTER. | |
| Press 2nd, MODE to return back to the home screen. | ||
| To run the program press PRGM. Then select the program by using the up and down arrows. Then press ENTER. |