Facebook
From Trivial Curlew, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 392
  1. <?php
  2. function potega($a, $b) {
  3.        
  4.         $k=$a;
  5.  
  6.         for ($i=1;$i<$b;$i++) {
  7.                 $a=$a*$k;
  8.         }
  9.         print($a);
  10.  
  11. }
  12. potega(2,2);
  13. potega(2,4);
  14. potega(2,534);
  15.  
  16.  
  17. ?>