note 26811 deleted from function.sqrt by tularis
| From: | tularis@php.net | Date: | Thu, 16 Feb 2012 16:36:09 +0000 |
| Subject: | note 26811 deleted from function.sqrt by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-186176@lists.php.net to get a copy of this message | ||
Note Submitter: tcn at pandora dot be
----
Checking if the square you want to take from a number is valid or not (you can't take the root
of a negative number)
if ($i<0)
{
echo "Error! The number you specified can't be rooted! It's negative!
}
else
{
echo "The square root of your number is ".sqrt($i);
}