9 lines
187 B
Text
9 lines
187 B
Text
/* Form the n-th Fibonacci number, n > 1. */
|
|
get list(n);
|
|
f1 = 0; f2 = 1;
|
|
do i = 2 to n;
|
|
f3 = f1 + f2;
|
|
put skip edit('fibo(',i,')=',f3)(a,f(5),a,f(5));
|
|
f1 = f2;
|
|
f2 = f3;
|
|
end;
|