Finding roots of quadratic equation

couldn not find the problem in the code.

public static void main(String args[]) {

Scanner scn=new Scanner(System.in);
int a=scn.nextInt();
int b=scn.nextInt();
int c=scn.nextInt();
int root1,root2;
int x=bb-4a*c;

if(x>0)
{
root1=(int)Math.round((-b+sqrt(x))/2a);
root2=(int)Math.round((-b-sqrt(x))/2
a);
System.out.println(“real and distinct”);
System.out.print(root2+" “+root1);
}
else if(x==0)
{
root1=(int)Math.round((-b+sqrt(x))/2*a);
System.out.println(“real and equal”);
System.out.print(root1+” "+root1);
}
else
{
System.out.println(“no is imaginary”);
}
}
}

hey @Unnati
use Math.sqrt() instead of sqrt();
correct code :

import java.util.*;

public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int a = scn.nextInt();
int b = scn.nextInt();
int c = scn.nextInt();
int root1, root2;
int x = b * b - 4 * a * c;
if (x > 0) {
root1 = (int) Math.round((-b + Math.sqrt(x)) / 2 * a);
root2 = (int) Math.round((-b - Math.sqrt(x)) / 2 * a);
System.out.println(“Real and Distinct”);
System.out.print(root2 + " " + root1);
} else if (x == 0) {
root1 = (int) Math.round((-b + Math.sqrt(x)) / 2 * a);
System.out.println(“Real and Equal”);
System.out.print(root1 + " " + root1);
} else {
System.out.println(“Imaginary”);
}
}
}