quadratics
Author |
Message |
Viper

|
Posted: Thu Sep 08, 2005 8:41 am Post subject: quadratics |
|
|
The formula for finding the roots of a quadratic equation (learned in gr. 11&12 math) is: if the equation is given in the form ax2 + bx + c = 0.
If the actual roots are not desired, but only the NUMBER of real solutions there are, the value under the square root sign must be determined first. If this value is negative there are no roots. If this value is 0 there is one root as determined by the formula. If the value is positive, there are two roots.
i need an algorithm which accepts the values of a, b, and c as input, calculates the value of the discriminant D = b2 - 4ac and reports the number of roots. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
StarGateSG-1

|
Posted: Thu Sep 08, 2005 11:01 am Post subject: (No subject) |
|
|
ummmm...
USE VARIABLES
Formula in programing work just like a calulator! |
|
|
|
|
 |
|
|