unsigned long long fatorial(int a)
{
xi = 1;
rod = 0;
for (f=0; f<a; f++)
{
xi *= rod + 1;
rod++;
}
return (xi);
}
At the beggining fot like fatorial(5) it's ok, the function gives me 120, and for other numbers, but for like fatorial(17) it gives a crazy number that isn't the 17 fatorial. And if I do it without 'unsigned', it gives me a NEGATIVE number. WTF??