Last change
on this file since 68 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:
208 bytes
|
Rev | Line | |
---|
[2] | 1 | program hoop;
|
---|
| 2 |
|
---|
| 3 | var
|
---|
| 4 | a: integer;
|
---|
| 5 |
|
---|
| 6 | function fac(i: integer): integer;
|
---|
| 7 |
|
---|
| 8 | begin
|
---|
| 9 | writeinteger(i);
|
---|
| 10 | if (i = 0) then
|
---|
| 11 | fac := 1
|
---|
| 12 | else
|
---|
| 13 | fac := i * fac(i-1)
|
---|
| 14 | end;
|
---|
| 15 |
|
---|
| 16 | begin
|
---|
| 17 | a := fac(5);
|
---|
| 18 | writeinteger(a)
|
---|
| 19 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.