PHP Compiler
<!DOCTYPE html> <html> <body> <?php $limit = 100; $a = 0; $b = 1; $c = 0; echo "Fibonacci series upto $limit: <br>"; echo "$a, $b"; while($c <= $limit) { $c = $a + $b; $a = $b; $b = $c; if($c <= $limit) echo ", $c"; } ?> </body> </html>
OUTPUT
Fibonacci series upto 100: 0 1 1 2 3 5 8 13 21 34 55 89
×
Save as
Private
Tag
AJAX
Canvas
CSS
Google Charts
HTML
Javascript
jQuery
JSON
SASS
SVG
Description
Save