Class Math

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

public class ejer6_clasemath {

public
double
double
double

static void main(String[] args) {


a=1,b=-8,c=15;
x1 = (-b + Math.sqrt((b*b)-(4*a*c)))/(2*a);
x2 = (-b - Math.sqrt((b*b)-(4*a*c)))/(2*a);

System.out.println("La solucion de x1: "+x1);


System.out.println("La solucion de x2: "+x2);
}
}

You might also like