3 odpowiedzi
+ 3
Prompt for values a, b, and c.
Calculate the formula in two parts - the positive and the negative.
Print the two results.
+ 3
Be careful:
if b<0, - b - sqrt(delta) is very unstable (the error gets amplified) so you should use an alternate form of the quadratic formula:
2c/(-b+sqrt(delta))
Viceversa if b>0, - b+sqrt(delta) is unstable , so what you should use instead is: 2c/(-b-sqrt(delta))
0
thanks guys