CJCoding With Joseph

Quadratic Root Nature

A quadratic equation has the form a*x*x + b*x + c = 0 (with a not zero). Read three doubles a, b, and c. Compute the discriminant d = b*b - 4*a*c and print the nature of the roots:

- d > 0 -> Two real roots
- d == 0 -> One real root
- d < 0 -> No real roots

For example, given the input 1 -3 2, the discriminant is 1, so the program prints:

Two real roots

Expected Output:

Two real roots
Topics:
If Statements
๐Ÿ“ฅ Auto-Input:
1 -3 2
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.