C
Collin D
You need to put your denominator, 2*a, in parens. The way it stands,
you are dividing by 2, then multiplying by a. That's not what you
want.
Also, for better style, I suggest you compute the discriminanat once
and store it for reuse rather than repeating the expression three
times.- Hide quoted text -
- Show quoted text -
I see what you mean on the denominator and discriminant. Ill do that.