How do i make two equations have to be equal?

Right now i am writing a program that will find the intersection point of two lines. My general equations are y=m1 * x + b1 and y = m2 * x +b2. I want to make m1 * x + b1 HAVE to equal m2 * x + b2, but i have no idea how to. Anyone have any suggestions?

Re: How do i make two equations have to be equal?

What are you stuck on, figuring out the mathematics of making equations equal or writing code to demonstrate the solution?

Re: How do i make two equations have to be equal?

Quote:

Originally Posted by

**jamesR**
... Anyone have any suggestions?...

My suggestion is to use algebra to derive arithmetic expressions for x and y in terms of m1, b1, m2, and b2.

Then write a program that gets user input for values of m1, b1, m2, and b2 and then evaluates the expressions to calculate (and, presumably, print) values of x and y.

Cheers!

Z