You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
355 B

26 years ago
26 years ago
26 years ago
  1. #ifdef DBUG_OFF /* We are testing dbug */
  2. #undef DBUG_OFF
  3. #endif
  4. #include <my_global.h>
  5. int factorial (
  6. register int value)
  7. {
  8. DBUG_ENTER ("factorial");
  9. DBUG_PRINT ("find", ("find %d factorial", value));
  10. if (value > 1) {
  11. value *= factorial (value - 1);
  12. }
  13. DBUG_PRINT ("result", ("result is %d", value));
  14. DBUG_RETURN (value);
  15. }