我想問呢題
According to the two-point form, a general equation of a straight line “y=mx+c” can be formed if two coordinates are given. Write a C program, it will accept two coordinates then find out the general equation.
(y-y1)/(x-x1)=(y2-y1)/(x2-x1)
Example:
Input coordinates for A(x1,y1) B(x2,y2):2 5 6 8
A(2,5) B(6,8)
The equation of two point is y=0.75x+3.5