31 lines
431 B
Plaintext
31 lines
431 B
Plaintext
INCLUDE "D2:REAL.ACT" ;from the Action! Tool Kit
|
|
|
|
PROC Multifactorial(INT n,d REAL POINTER res)
|
|
REAL r
|
|
|
|
IntToReal(1,res)
|
|
WHILE n>1
|
|
DO
|
|
IntToReal(n,r)
|
|
RealMult(res,r,res)
|
|
n==-d
|
|
OD
|
|
RETURN
|
|
|
|
PROC Main()
|
|
BYTE n,d
|
|
REAL r
|
|
|
|
Put(125) PutE() ;clear the screen
|
|
FOR d=1 TO 5
|
|
DO
|
|
PrintF("Degree %B:",d)
|
|
FOR n=1 TO 10
|
|
DO
|
|
Multifactorial(n,d,r)
|
|
Put(32) PrintR(r)
|
|
OD
|
|
PutE()
|
|
OD
|
|
RETURN
|