Paste Search Dynamic
raised to the power
  1. <?php
  2.  
  3. $x=3;
  4. $y=4;
  5. $power=1;
  6.  
  7. for($i=1;$i<=$y;$i++)
  8.  $power=$power*$x;
  9.   echo $x.' raised to the power '.$y.' = '.$power;
  10.  
  11.  
  12. ?>
Parsed in 0.008 seconds