Friday, July 5, 2013

how to write a program square x root of y. using function in php

<?php
function squarepow2($x,$y)
{
    (float)$total=1;
    for($i=1;$i<=$y;$i++)
   {
        $total*=$x;
    }
    return $total ;
}
echo squarepow2(2.0,3);
?>

No comments:

Post a Comment