12 lines
199 B
Plaintext
12 lines
199 B
Plaintext
// Calculates the factorial of the given number
|
|
CVM MAGNVM
|
|
|
|
DEFINI fact(n) VT {
|
|
SI n MINVS I TVNC {
|
|
REDI(I)
|
|
} ALVID {
|
|
REDI(n * INVOCA fact(n - I))
|
|
}
|
|
}
|
|
|
|
DICE(INVOCA fact(AVDI_NVMERVS())) |