How can I programme php web program,that solves quadratic equatios?
- Wednesday, May 19, 2010, 15:54
- Programming
- 1 comment
today i had first lesson of php programming.i could do that if i know variable.please write whole web program in answer.it is easy for good programmers.and teacher said that it consist two web pages.
About the Author
One Comment on “How can I programme php web program,that solves quadratic equatios?”
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!
You must be logged in to post a comment.
Hm….
Using abc formulas:
x1=[b + V(b^2 - 4a.c)]/(2a)
or
x2=[b - V(b^2 - 4a.c)]/(2a)
$D = $b*$b – 4*$a*$c;
if($D>=0){
$x1 = (-$b + sqrt($D))/(2*$a);
$x2 = (-$b – sqrt($D))/(2*$a);
echo”Solve : {$x1, $x2}”;
}
else echo “Undefine!”;