For revising Quadratic Equations Question
Whats the error in this code
First line contains nature of the roots .
The next line contains roots( If roots are imaginary do not print the roots.
add this to your code
I made the changes in the code and its still not running green for all test cases
follow this
- Calculate the D viz, sqrt(b * b - 4 * a * c).
- If D < 0,
2.1 print Imaginary - if D == 0,
3.1 print Real and Equal
3.1 Calculate roots using formula ( - b + D) / (2 * a) and (- b - D)/ (2 * a)
3.2 Print the roots - If D > 0,
4.1 print Real and Distinct
4.2 Calculate roots using formula ( - b + D) / (2 * a) and (- b - D)/ (2 * a)
4.3 print the roots (in non-decreasing order) - End