projects
/
testub10.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
arm: init
[testub10.git]
/
gesamt_ppc
/
codeb_georg_fib_023.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
var a := 0;
9
var b := 1;
10
var c := x;
11
while not (x < 2)
12
do
13
var A := a;
14
var B := b;
15
a := B;
16
b := A-(0-B);
17
c := b;
18
x := x-1;
19
end;
20
return c;
21
end;