home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-06-28 | 342 b | 25 lines | [TEXT/TCEd] |
- #
- # Factorial
- #
- # Last Modified: Friday, June 27, 1991 at 11:46 PM
- # Macro Files for Preditor
- #
- # © Copyright Evatac Software 1988-1991
- # All rights reserved
- #
-
- If (~0 != 1)
- Echo("usage: Fact number")
- Return(-1)
- End
-
- FactTot = 1 ; FactNum = ~1
-
- While (FactNum > 0)
- FactTot = FactTot * FactNum
- FactNum = FactNum - 1
- End
-
- Return(FactTot)
-
-