Linear equation solution - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Linear equation solution

Posts: 3Member

I am looking for an algorithm in C++
to solver linear equations

Do you have an idea whare I can find it???

thanks

• Posts: 675Member
I am not much of a C++ programmer but I am pretty good at math.

If you have 2 lines defined by the equations:
y= m*x+ b
and y= n*x+ c

the solution is:

x = (c-b)/(m-n)
y = m*x+b // if you have x calculated
// otherwise
y = m*(c-b)/(m-n)+b

I hope this helps.

:
: I am looking for an algorithm in C++
: to solver linear equations
:
: Do you have an idea whare I can find it???
:
: thanks
:

• Posts: 3Member
Thanks for your
help

bye

: I am not much of a C++ programmer but I am pretty good at math.
:
: If you have 2 lines defined by the equations:
: y= m*x+ b
: and y= n*x+ c
:
: the solution is:
:
: x = (c-b)/(m-n)
: y = m*x+b // if you have x calculated
: // otherwise
: y = m*(c-b)/(m-n)+b
:
: I hope this helps.
:
: :
: : I am looking for an algorithm in C++
: : to solver linear equations
: :
: : Do you have an idea whare I can find it???
: :
: : thanks
: :
:
: