Advertisement
villers

Untitled

Sep 18th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. function my_put_nbr_base($x)
  4. {
  5.     $fin = $x % 10;
  6.     $debut = $x / 10;
  7.      if ($debut != 0)
  8.         my_put_nbr_base($debut);
  9.     echo $fin + 0;
  10. }
  11.  
  12. function my_aff_combn($n)
  13. {
  14.     $i = 0;
  15.     while ($i< (10^$n-1))
  16.         {
  17.             echo 0;
  18.             my_put_nbr_base($i);
  19.             echo ', ';
  20.             $x++;
  21.         }  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement