Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int my_factorielle_it(int nb)
- {
- unsigned long result;
- result = 1;
- if (nb < 0)
- result = 0;
- while (nb > 1)
- {
- if (result * nb > 0xffffffff)
- return 0;
- result = result * nb;
- nb = nb - 1;
- }
- return (result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement