projects
/
testub10.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
scripts: fix... damn regex *sigh*
[testub10.git]
/
codeb
/
georg_fib_001.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()
8
if this < 2 then return this; end;
9
var a := 0;
10
var b := 1;
11
var c := this;
12
var x := this;
13
while not (x < 2)
14
do
15
c := a-(0-b);
16
a := b;
17
b := c;
18
x := x-1;
19
end;
20
return c;
21
end;