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