home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
proglang
/
vclang.arj
/
FACT.CLN
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1990-08-17
|
223 b
|
13 lines
program TESTFUNCTIONS;
var N;
function FACTORIAL (M);
begin
if M = 1 then FACTORIAL := 1;
if M > 1 then FACTORIAL := M * FACTORIAL(M-1)
end;
begin
read(N);
write(FACTORIAL(N))
end.