Last change
on this file since 81 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:
360 bytes
|
Line | |
---|
1 | program hoop;
|
---|
2 |
|
---|
3 | var
|
---|
4 | a: integer;
|
---|
5 |
|
---|
6 | function plus(a, b: integer): integer;
|
---|
7 |
|
---|
8 | begin
|
---|
9 | plus := a + b
|
---|
10 | end;
|
---|
11 |
|
---|
12 | function fac(i: integer): integer;
|
---|
13 |
|
---|
14 | var
|
---|
15 | hlp: integer;
|
---|
16 |
|
---|
17 | begin
|
---|
18 | if (i = 0) then
|
---|
19 | fac := 1
|
---|
20 | else
|
---|
21 | begin
|
---|
22 | hlp := fac(i-1);
|
---|
23 | writeinteger(i);
|
---|
24 | writeinteger(hlp);
|
---|
25 | fac := i * hlp
|
---|
26 | end
|
---|
27 | end;
|
---|
28 |
|
---|
29 | begin
|
---|
30 | a := fac(plus(3,2));
|
---|
31 | writeinteger(a)
|
---|
32 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.