Last change
on this file since 195 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
File size:
231 bytes
|
Line | |
---|
1 | program fibonee;
|
---|
2 |
|
---|
3 | var
|
---|
4 | hlp: integer;
|
---|
5 |
|
---|
6 | function fibo(i: integer): integer;
|
---|
7 |
|
---|
8 | begin
|
---|
9 | writeinteger(i);
|
---|
10 | if (i <= 1) then
|
---|
11 | fibo := 1
|
---|
12 | else
|
---|
13 | fibo := fibo(i-1) + fibo(i-2)
|
---|
14 | end;
|
---|
15 |
|
---|
16 | begin
|
---|
17 | hlp := fibo(4);
|
---|
18 | writeinteger(hlp)
|
---|
19 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.