Project 15: Solving Quadratic X-Intercepts

The steps below use completing the square to derive the quadratic formula:

The x-intercepts (zeros) for the quadratic above are x = -1 and x = 4.  While this quadratic is actually factorable, we can always use the quadratic formula to find zeros.

Project 15: Your project has initialized 3 variables 'a', 'b', 'c'.  These represent the coefficients of a quadratic (i.e. 1, -3, -4 for the quadratic shown above) 


Task: Correctly initialize variables 'zero1' and 'zero2' to represent the x-intercepts of a quadratic.  If the quadratic does not have any real x-intercepts (i.e. the quadratic does not touch the x-axis), zero1 and zero2 should not have a value (undefined type).

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0