"; else if($d == 0) { $x = -$b/(2*$a); print "The root is: $x

"; } else { $x1 = (-$b + sqrt($d)) /(2*$a); $x2 = (-$b - sqrt($d)) /(2*$a); $x1 = number_format($x1, 2); $x2 = number_format($x2, 2); print "The roots are: $x1, $x2.

"; } } print "Here is the solution for 2x2 -3x -11 = 0.

"; $a = 2; $b = -3; $c = -11; root_4_eq($a, $b, $c); print "


Here is the solution for 3x2 +4x -5 = 0.

"; $a = 3; $b = 4; $c = -5; root_4_eq($a, $b, $c); ?>