compilation successfull. then whats wrong.
Run error. but compilation successfull
@KUNAL.SHARMA5724510
you have to integer output of the final answer otherwise it get modified.
import java.util.Scanner;
public class QUADRATIC {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double a,b,c;
double N,n;
a=input.nextInt();
b=input.nextInt();
c=input.nextInt();
double dicr=((b*b)-(4*a*c));
double root=(double)Math.sqrt(dicr);
if(dicr<0) {
}
else if(dicr==0) {
n=(-b+root)/2*a;
N=(-b-root)/2*a;
System.out.print((int)N+" "+(int)n);
}
else if(dicr>0) {
n=(-b+root)/2*a;
N=(-b-root)/2*a;
if(N>n) {
System.out.print((int)n+" "+(int)N);
}
else {
System.out.print((int)N+" "+(int)n);
}
}
}
}