Given a quadratic equation in the form ax2 + bx + c. The task is to find the floor of roots of it. For example, floor of 5.6 is 5.
First line of input contains an integer, the number of test cases T. Each test case should contain three positive numbers a, b and c in the same line seperated by space.
If roots of equations exists, then print the two roots separated by space (Higher valued root should be printed before lower valued). Else if a = 0, then print "Invalid" as equation is not quadratic. If roots are imaginary, then print "Imaginary"
1 <= T <= 50
-103 <= a <= 103
-103 <= b <= 103
-103 <= c <= 103
1 -2 1
1 -7 12
1 4 8
Testcase 1: Roots of equation x2 - 7x + 12 are 4 and 3.
Testcase 3: Roots of equation x2 + 4x + 8 are imaginary since it's discriminant is less than 0.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.