BCX Console Demonstration Program s37.bas

 PRINT "The known factorial of 34 is 2.952328e+038"
 PRINT "The calculated factorial of 34 is ";Factorial!(34)
 
 FUNCTION Factorial!(R!)
   IF (R! > 0) AND(R! <= 34) THEN
     FUNCTION = R! * Factorial!(R!-1)
   ELSE
     FUNCTION = 1
   END IF
 END FUNCTION

Result:


 The known factorial of 34 is 2.952328e+038
 The calculated factorial of 34 is  2.952328E+38