Advertisement
b4nz0k

Sucesión de Fibonacci

Nov 27th, 2011
61
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. /* No se porque se complican tanto en la sucesión de Fibonacci xD */
  4.  
  5. print "\n### - Sucesión de Fibonacci! -- ###\n\n";
  6. $a=1;
  7. $b=1;
  8. while ($a<=100)
  9.     {
  10.     print $a . ", " .  $b . ", ";
  11.     $a = $a + $b;
  12.     $b = $a + $b;
  13.     }
  14. print "\n\n### --- --- --- --- --- --- --- ### \n\n";
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement