of     2   
chevron_rightchevron_rightchevron_right

Telamon
#118296Wednesday, August 22, 2007 5:49 AM GMT

This one might be a bit hard; I'm wondering if anyone can solve it. First correct solution wins 987 tix. Bonus tix for style. ---- function fib(n) ... end ---- Fill in ... so that the fib function returns the nth Fibonacci number. The Fibonacci Sequence starts: 0, 1, 1, 2, 3, 5, 8, ... Each number in the sequence is the sum of the 2 numbers that come before it. For example, the 6th number in the sequence is 5. This is becuase 2 + 3 = 5.
Telamon
#118300Wednesday, August 22, 2007 5:51 AM GMT

I'll give you guys a hint if no one gets it by the afternoon, so check back if you get stuck.
Psychox77
#118307Wednesday, August 22, 2007 5:57 AM GMT

Uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh. 95?? lol
CPRULEZ
Top 100 Poster
#118309Wednesday, August 22, 2007 5:58 AM GMT

im not good at scripting but 0, 1, 1, 2, 3, 5, 8, i can go on forever with that and you also got that from cyberchase. LOL. ohh and do you mind if i post like 0, 1, 1, 2, 3, 5, 8, 13, and more?
Anaminus
Top 100 Poster
#118326Wednesday, August 22, 2007 6:40 AM GMT

function fib(n) fibs={1,1} for i=3,n do fibs[i]=fibs[i-1]+fibs[i-2] end return fibs[n] end That's one way, at least... ?-Anaminus-?
CPRULEZ
Top 100 Poster
#118331Wednesday, August 22, 2007 6:50 AM GMT

ur smart........ 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 1088 and so on.
PCwiener
#118420Wednesday, August 22, 2007 11:50 AM GMT

function fib(n) fibs={3, 5} for i=3, n do fibs[i]=fibs[i-1]+fibs[i-2] end return fibs[n] end ?
jimmy347
#118481Wednesday, August 22, 2007 12:33 PM GMT

function fib(n) fibs={2,4 } for i=3, n do fibs[i]=fibs[i-1]+fibs[i-2] end return fibs[n] end {Jimmy} :-0
buttlad3
#118529Wednesday, August 22, 2007 1:36 PM GMT

um splee
jimmy347
#118534Wednesday, August 22, 2007 1:49 PM GMT

function fib(n) fibs={8,13 } for i=3, n do fibs[i]=fibs[i-1]+fibs[i-2] end return fibs[n] end
Telamon
#118796Wednesday, August 22, 2007 4:16 PM GMT

Anaminus - nice solution. It's even better than the one I came up with since it uses less memory and is faster to execute. 200 tix bonus! This is what I came up with: function fib(n) if (n <= 2) then return n - 1 end if (n > 2) then return fib(n-1) + fib(n-2) end end
MrDoomBringer
Top 100 Poster
#118799Wednesday, August 22, 2007 4:24 PM GMT

Well, that was fast.
Robotica
#118808Wednesday, August 22, 2007 4:31 PM GMT

:O no kidding
nintendoboy
#118947Wednesday, August 22, 2007 6:09 PM GMT

[ Content Deleted ]
haloguy
#119313Wednesday, August 22, 2007 10:00 PM GMT

brain hurts....>_<
Mario68
Top 100 Poster
#119316Wednesday, August 22, 2007 10:01 PM GMT

i say. i am not good at scripting lol but nice job. I got the ANAMINUS WINS. Whew, jimmy copied Anaminus
lavamaster
#119518Wednesday, August 22, 2007 11:33 PM GMT

gah this is confusing! i shuld stick with building ofr now on >.<
sloso
Top 100 Poster
#119601Thursday, August 23, 2007 12:21 AM GMT

LOL Even looking at scripting destroyes my brain, now theres a script brainbuster >=(
rusty2
#119690Thursday, August 23, 2007 1:10 AM GMT

All i know how to do is Regenerateing scripts and admin doors! +Rust+
TehYumz
#119752Thursday, August 23, 2007 1:52 AM GMT

id have to say function fib(n) fibs={3, 5} for i=3, n do fibs[i]=fibs[i-1]+fibs[i-2] end return fibs[n] end could be wrong though : \
NEGOKSA
#588134Wednesday, March 12, 2008 11:38 PM GMT

cool but how do i make admin shirt doors
commander79
#1155453Friday, May 30, 2008 4:34 PM GMT

^ spammer! | | |
gergy008
#1155506Friday, May 30, 2008 4:43 PM GMT

[ Content Deleted ]
commander79
#1155516Friday, May 30, 2008 4:44 PM GMT

>_<
Crashdance22
#1156028Friday, May 30, 2008 6:02 PM GMT

Darn! i had the same as anaminus function fib(n) fibs={1,1} for i=3,n do fibs[i]=fibs[i-1]+fibs[i-2] end return fibs[n] end

    of     2   
chevron_rightchevron_rightchevron_right