in reply to Re: Re: Fibonacci numbers(Again)
in thread Fibonacci numbers

Dear Anonymous, It's very simple. In every iteration the $a receives the earlier value of $b...that's the trick. Bye the way, u can see my ealier attempt, which had one serious mistake... that can be rewritten to give the desired result. See:
$a=1; $b=1; while($a <=200) {$c=$a+$b; print("$a\n$b\n$c\n"); $a=$b+$c; $b=$c+$a; }
Thanks.