Wednesday, November 26, 2008

How to get the Square root of a numeric value using php - sqrt()

Following code will show you how to get the Square root of a given numeric value.


<?php

echo sqrt(4); // 2

echo sqrt(12); // 3.4641016151378

echo sqrt(16); // 4

echo sqrt(17); // 4.1231056256177

?>


Get Free Sinhala IT Learning Videos Kuppiya.com


Get custom programming done at GetAFreelancer.com!

No comments:

Post a Comment