Last change
on this file since 74 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:
349 bytes
|
Line | |
---|
1 | program k;
|
---|
2 |
|
---|
3 | function test(i: integer): integer;
|
---|
4 |
|
---|
5 | var hlp1, hlp2: integer;
|
---|
6 | begin
|
---|
7 | writeinteger(i);
|
---|
8 | if (i > 1) then
|
---|
9 | begin
|
---|
10 | hlp1 := test(i-1);
|
---|
11 | hlp2 := test(i-1);
|
---|
12 | writeinteger(-hlp1);
|
---|
13 | writeinteger(-hlp2);
|
---|
14 | test := hlp1 + hlp2
|
---|
15 | end
|
---|
16 | else
|
---|
17 | begin
|
---|
18 | writeinteger(-1);
|
---|
19 | test := 1
|
---|
20 | end
|
---|
21 | end;
|
---|
22 |
|
---|
23 | begin
|
---|
24 | writeinteger(test(4))
|
---|
25 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.