<?php
fscanf(STDIN, "%f %f %f", $A, $B, $C);
$delta = ($B**2) - (4*$A*$C);
if ($A != 0 && $delta >= 0) {
$R1 = (-($B) + sqrt($delta)) / (2*$A);
$R2 = (-($B) - sqrt($delta)) / (2*$A);
printf ("R1 = %.5f\nR2 = %.5f\n", $R1, $R2);
} else {
echo "Impossivel calcular\n";
}
?>
To embed this project on your website, copy the following code and paste it into your website's HTML: