Files @ r21247:551dd5576334
Branch filter:

Location: cpp/openttd-patchpack/source/src/3rdparty/squirrel/samples/fibonacci.nut

translators
(svn r26335) -Update from WebTranslator v3.0:
croatian - 7 changes by VoyagerOne
frisian - 54 changes by Geoloep
korean - 1 changes by telk5093
spanish - 1 changes by Welder05
/*
*
* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/)
*
*/

function fib(n)
{
    if (n < 2) return 1
    return fib(n-2) + fib(n-1)
}

local n = ARGS.len()!=0?ARGS[0].tointeger():1

print(fib(n)+"\n")