ok im trying to make a program for solving square equations by the general formula
but for some reason i cannot get it to solve the equation
so if anyone can help me
this is my code:
va= Integer.parseInt(a.getText());
vb= Integer.parseInt(b.getText());
vc= Integer.parseInt(c.getText());
vac=(4*va*vc);
vbc=(2*vb*vb);
vac2= (2*va);
vb2=(-1*vb);
raiz = Math.sqrt(vbc-vac);
vx1= ((vb2+raiz) / vac2);
vx2= ((vb2-raiz) / vac2);
x1p=String.valueOf(vx1);
x2p=String.valueOf(vx2);
x1.setText(x1p);
x2.setText(x2p);