PHP Fibonacci 07-29-2013, 08:19 AM
#1
Last weak ,My friend is call me to challenge about the fibonacci:Frown:
he is C# developer :Thumbs-Up:
but i will solve with php because i am php web develper :Sarcastic:
Here is my Answer with Prof:Innocent:
![[Image: 2ca7n5.png]](http://i40.tinypic.com/2ca7n5.png)
Source code
he is C# developer :Thumbs-Up:
but i will solve with php because i am php web develper :Sarcastic:
Here is my Answer with Prof:Innocent:
![[Image: 2ca7n5.png]](http://i40.tinypic.com/2ca7n5.png)
Source code
Code:
<html>
<head><title>Fibonacci Challenge</title><head>
<body>
<form action="" method="post">
<input type="text" name="name"/>
<br>
<input type="submit" value="enter"/>
</form>
</body>
</html>
<?php
$first = 0;
$second = 1;
$n =$_POST['name'];
print 'Your input number is = '. $n . '<br/>';
print 'Fibonacci numbers is = '. $first.',';
for($i=1;$i<=$n-1;$i++)
{
$final = $first + $second;
$first = $second;
$second = $final;
print $final . ',';
}
?>![[Image: 946696_301886219956429_1080285596_n.jpg]](https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-ash3/946696_301886219956429_1080285596_n.jpg)
áąááąááá˛áááŽá¸ááášáá˝á ášáąááŹáášááśáŻá¸áááŻáĄááášá¸ááşá ášáááš

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)