mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
13 lines
286 B
C
13 lines
286 B
C
#include <my_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);
|
|
}
|