home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / baswiz / bw_bas / facts.bas < prev    next >
BASIC Source File  |  1992-08-29  |  710b  |  18 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        BASWIZ  Copyright (c) 1990-1992  Thomas G. Hanlin III         |
  4. '   |                                                                      |
  5. '   |                      The BASIC Wizard's Library                      |
  6. '   |                                                                      |
  7. '   +----------------------------------------------------------------------+
  8.  
  9.    DEFINT A-Z
  10.  
  11. FUNCTION FactS! (Num AS INTEGER)
  12.    Result! = 1!
  13.    FOR N = 2 TO Num
  14.       Result! = Result! * N
  15.    NEXT
  16.    FactS! = Result!
  17. END FUNCTION
  18.