Quote:
i hate to rite a program
I suppose it is "I have to write".
you are writing a question for others, make it clear. Pay attention to spelling.
Quote:
determines the solution of a degree 1 equation with real coefficients, of the form ax+b = 0
Read carefully the requirement !
In this case, you want to find x.
result = a*x + b = 0;
The language will not guess what you want to do. This code is correct c, but it have another meaning.
The requirement wants you to find the mathematics to solve the equation by hand, and then translate this mathematic to a program.