Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <title> Série de Fibonacci </title>
- <style>
- body
- {
- background: rgba(74, 32, 172, 0.31);
- font: "Times new Roman", Verdana, Arial;
- text-decoration: none;
- text-shadow: 1px 1px 1px;
- color: #000000;
- text-align: center;
- font-weight: 200px;
- font: 22px;
- }
- a
- {
- text-decoration: none;
- color: #006699;
- }
- </style>
- </head>
- <body>
- <?php
- $posicao = $_GET['posicao'];
- $a = 0;
- $b = 1;
- $c = 1;
- $i = 1;
- while ($i <= $posicao )
- {
- $c = $a + $b;
- $a = $b;
- $b = $c;
- echo($c. ",");
- $i++;
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement