42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
my_compute_factorial_rec.c File Reference

The file containing the my_compute_factorial_rec function. More...

#include "my.h"

Functions

int my_compute_factorial_rec (int nb)
 Returns the factorial of a number (nb)
 

Detailed Description

The file containing the my_compute_factorial_rec function.

Author
Nicolas TORO

Function Documentation

◆ my_compute_factorial_rec()

int my_compute_factorial_rec ( int nb)

Returns the factorial of a number (nb)

Note
Returns 0 if the number is negative or greater than 12
Parameters
nbThe number to calculate
Returns
int The factorial of the number
Author
Nicolas TORO