solving equations and finding values of x and y from two equations in c programming -


is solving equations possible in c programming using math library?

if have 2 equations

 y-y1=m1(x-x1)  

and

y-y2=m2(x-x2) 

i'll generating values of m1, m2, x1, x2,y1, y2 through fomrula in program. able find value of x , y? tried, couldn't.

if m1, m2, x1, x2, y1, y2 known using formulae can find them

x = [(2*y1)/(m2-m1)] - [(2*m1*x1)/(m2-m1)] + [(m1*x1)/(m2-m1)] + [(m2*x2)/(m2-m1)] + [(y1+y2)/(m2-m1)]

and y:

y = [(y1+y2)/2] + [(m1+m2)*x/2] - [(m1*x1)/2] - [(m2*x2)/2]

note: in formula y appears x, if compute before not problem


Comments