The summary pretty much says it all. I want it to give me two numbers and a fraction, and if/when the denominator is zero, just give me the two numbers and no fraction.

This is using the distance formula (line 7), then the slope formula (line 8).

Thank you!

Here's the code:

Lbl 1

ClrHome

Disp "Point A"

Prompt A,B

Disp "Point B"

Prompt C,D

(C-A)²+(D-B)²→X

√(X)→Y

(D-B)/(C-A)→Z

If Z>0

Disp "SQRT",X

Disp "DISTANCE REAL",Y

Disp "SLOPE",Z

Else

Disp "SQRT",X

Disp "DISTANCE REAL",Y

Pause

Goto 7