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