BETA
School Problem's Submission isn't counted in score!

Submissions: 1224 Accuracy:

10.38%

Java Operators(Arithmetic) | Set 1
       

Given three numbers A,B and C. Find roots of quadratic equation Ax2 + Bx + C = 0. (A not equal to  0)

Input:
First line of the input contains an integer T which denotes the number of test cases. Then T test cases follow.  Each test case contains a single line containing three space separated integers A,B and C. 

Output: 
For each test case, Print two roots of quadratic equation(space separated) in ascending order. For complex roots,print COMPLEX.

Constraints:
1 <= T< = 100
-10<=A<=10
-10<=B<= 10
-10<=C<= 10

Note: A is not equal to 0.

Example:
Input:

3
2 3 4
3 5 1
1 -4 4    
Output:
COMPLEX
-1.4342586 -0.23240812 
2.0 2.0

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Gaurav Miglani

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.