Answers for "Write a program to print fibonacci series in Php using while loop"

PHP
0

Write a program to print fibonacci series in Php using while loop

<?php 
$number = 0; 
$a = 0; 
$b = 1; 
echo "\n"; 
echo $a.' '.$b.' '; 
while ($number < 10 ) 
{ 
$c = $b + $a; 
echo $c.' '; 
$a = $b; 
$b = $c; 
$number = $number + 1; 
}
?>
Posted by: Guest on July-05-2021

Code answers related to "Write a program to print fibonacci series in Php using while loop"

Browse Popular Code Answers by Language