Problem in challenges of fundamental and patterns(que - revesing quadratic equation)

import java.util.*;
public class Main {
public static void main(String args[]) {

	// TODO Auto-generated method stub

	Scanner Sc = new Scanner(System.in);
	int a = Sc.nextInt();
	int b = Sc.nextInt();
	int c = Sc.nextInt();
	if(a>=-100 && a<=100)
		if(b>=-100 && b<=100)
			if(c>=-100 && c<=100)
	{
		
		int del = b*b - 4*a*c;
		double sqrt = Math.sqrt(del);
		int r1 = (int)((-b+sqrt)/(2*a));
		int r2 = (int)((-b-sqrt)/(2*a));
		if(del<0)
		{
			System.out.println("roots are imaginary");
		}
		if(del==0)
		{
			System.out.println("roots are equal");
			System.out.println(r1+" "+r2);
		}
		if(del>0)
		{
			System.out.println("roots are distinct and real");
			System.out.println(r1+" "+r2);
		}
}
}

}

where my code is wrong…it does not apss any test cases

@mayanktiwari6957,

https://ide.codingblocks.com/s/250952 corrected code

  1. print “Imaginary”, “Real and Equal” and “Real and Distinct” as mentioned in the questions.
  2. Print the roots “in increasing order” as mentioned in the question.

Follow the output format. Your logic was correct.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.