This is a very general interview question of any interview in programming
Output :
1 2 3 5 8 13 21 34 55 89 144
You like this post don't forget to leave a comment.
Chears :)
Happy coding
$first = 0;
$second = 1;
for($i=0;$i<=10;$i++){
$third = $first+$second;
echo $third.' ';
$first = $second;
$second = $third;
}
Output :
1 2 3 5 8 13 21 34 55 89 144
You like this post don't forget to leave a comment.
Chears :)
Happy coding