CMPSC 201 - If Statements Worksheet #3 | Name - |
1. Write a program that calculates the roots of a quadratic equation ( ax^2 + bx + c = 0 ) regardless of the value of the discriminant (b^2 - 4ac). The program must print imaginary roots as well as real roots. If there is only 1 distinct root, the output must only list it once. Otherwise, print both roots. You can assume that the user will input valid integers for a, b, and c.