Find the intersection of two lines: Difference between revisions

m
No edit summary
Line 569:
print "yab = ", y
print "ycd = ", (yc - xc * ((yd - yc) / (xd - xc)) + x * ((yd - yc) / (xd - xc)))
print "intersection: (", x, comma, " ", y, ")"</syntaxhighlight>
{{out| Output}}<pre>The two lines are:
 
yab = -20 + x * 5
end</syntaxhighlight>
ycd = 3 + x * 0.4000
x = 5
yab = 5
ycd = 5
intersection: (5, 5)</pre>
 
==={{header|Run BASIC}}===
305

edits