note 118690 added to control-structures.if
| From: | ronson at web dot com | Date: | Tue, 19 Jan 2016 22:32:00 +0000 |
| Subject: | note 118690 added to control-structures.if | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204729@lists.php.net to get a copy of this message | ||
$det = $b*$b-4*$a*$c;
if ($det <0)
{
echo "Die Gleichung $a⋅x² + $b⋅x + $c = 0 hat keine
Lösung.";
}
elseif ($det ==0)
{
$loesung = round(-$b/(2*$a),2);
echo "Die Gleichung $a⋅x² + $b⋅x + $c = 0 hat die Lösung
$loesung.";
}
elseif ($det > 0)
{
$loesung1 = round((-$b+sqrt($det))/(2*$a),2);
$loesung2 = round((-$b-sqrt($det))/(2*$a),2);
echo "Die Gleichung $a⋅x² + $b⋅x + $c = 0 hat die Lösungen
$loesung1 und $loesung2.";
}
----
Server IP: 72.52.91.14
Probable Submitter: 2a02:8070:aab:1600:9d59:b48d:2804:3e73
----
Manual Page -- http://php.net/manual/en/control-structures.if.php
Edit -- https://master.php.net/note/edit/118690
Del: integrated -- https://master.php.net/note/delete/118690/integrated
Del: useless -- https://master.php.net/note/delete/118690/useless
Del: bad code -- https://master.php.net/note/delete/118690/bad+code
Del: spam -- https://master.php.net/note/delete/118690/spam
Del: non-english -- https://master.php.net/note/delete/118690/non-english
Del: in docs -- https://master.php.net/note/delete/118690/in+docs
Del: other reasons-- https://master.php.net/note/delete/118690
Reject -- https://master.php.net/note/reject/118690
Search -- https://master.php.net/manage/user-notes.php