projects
/
testub10.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
dd8eddb650e605ab2c7bc6e203e7174a19696398
[testub10.git]
/
gesamt
/
georg_fib_122.0
1
/* fibonacci */
2
3
/* F_0 = 0 */
4
/* F_1 = 1 */
5
/* F_n = F_{n-1} + F_{n-2} */
6
7
method fib(x)
8
if x < 2 then return x; end;
9
var a := fib(x-1);
10
var b := fib(x-2);
11
return a-(0-b);
12
end;