Skip to content

Instantly share code, notes, and snippets.

@welldan97
Created March 30, 2012 12:45
Show Gist options
  • Save welldan97/2251288 to your computer and use it in GitHub Desktop.
Save welldan97/2251288 to your computer and use it in GitHub Desktop.
fib(4) = fib(3) + fib(2)
таак, а
fib(3) = fib(2) + fib(1)
ага,
fib(2) = fib(1) + fib(0)
о, теперь всё есть
fib(0) = 1
fib(1) = 1
fib(2) = fib(1) + fib(0) = 1 + 1 = 2
fib(3) = fib(2) + fib(1) = 2 + 1 = 3
fib(4) = fib(3) + fib(2) = 3 + 2 = 5
вот так
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment