Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
P is for Practical
 
PerlMonks  

RE (tilly) 1: Fibonnaci

by tilly (Archbishop)
on Oct 02, 2000 at 23:20 UTC ( [id://35011]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Reaped: Fibonnaci

Without an array and starting from 0:
$a=$b=1;{$b-=$a+=$b*=-1;print$a,$/;999999>$a&&redo}

Replies are listed 'Best First'.
RE: RE (tilly) 1: Fibonnaci
by Adam (Vicar) on Oct 02, 2000 at 23:49 UTC
    Wow! Ok, I'm impressed.
      Thanks, but I stopped golfing way too soon:
      $a=1;print$a-=$b+=$a*=-1,$/while$a<10**6
        Yup, you did:
        $a=1;print$a-=$b+=$a*=-1,$/for 0..31
        (After all 1346269 is an arbitrary stopping place.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://35011]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.