you guys suck. crack open a numerical methods book! anyhow:
ax^2 + bx + c = 0;
solving for x, x = (-b + sqrt(b^2 - 4*a*c))/2*a
--
print "gimme the value of a: ";
$a = <STDIN>;
print "gimme the value of b: ";
$b = <STDIN>;
print "gimme the value of c: ";
$c = <STDIN>;
# x = (-b + sqrt(b^2 - 4*a*c))/2*a
$x_pos = (-$b + sqrt($b^2 - (4*$a*$c)))/(2*$a);
$x_neg = (-$b - sqrt($b^2 - (4*$a*$c)))/(2*$a);
print: "lol perl wut! x = either $x_pos or $x_neg\r\n";
or somesuch; check the parentheses to make sure i got 'em right, i gotta run to a meeting
edit: fixed to include negative case, lol me, math is for jerx