All pastes #2087116 Raw Edit

Mark don't use INT

public text v1 · immutable
#2087116 ·published 2011-10-05 13:13 UTC
rendered paste body
double a1;
            double b1;
            double c1;
            double y1;
            double x1;
            
            System.out.println("Enter value for a: ");
            a1=input.nextDouble();
            System.out.println("Enter a value for b: ");
            b1=input.nextDouble();
            System.out.println("Enter a value for c: ");
            c1=input.nextDouble();
            
            x1=(-b1+ Math.sqrt(b1*b1-4*a1*c1))/(2*a1);
            y1=(-b1- Math.sqrt(b1*b1-4*a1*c1))/(2*a1);
            
            System.out.println("The answer is: "+x1+ "and" +y1);