answersLogoWhite

0

== == using recursions:

unsigned int Factorial( unsigned int x) { if(x>0) { return ( x * Factorial(x-1)); } else { return(1); }

}

factorial:

unsigned int Factorial( unsigned int x)

{

unsigned int u32fact = 1;

if( x == 0)

{

return(1);

}

else

{

while(x>0)

{

u32fact = u32fact *x;

x--;

}

}

}

User Avatar

Wiki User

15y ago

What else can I help you with?