![]() |
|
Problems? Is your data what you think it is? | |
PerlMonks |
Re^2: Fibonacci Generatorby Anonymous Monk |
on Dec 06, 2009 at 03:48 UTC ( #811301=note: print w/replies, xml ) | Need Help?? |
i think this is much better:---
#!/user/bin/perl
$a=0;
$b=1;
for($i=0;$i<=20;$i++)
{
print "$a\n";
$c=$a+$b;
$a=$b;
$b=$c;
}
In Section
Code Catacombs
|
|