Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

C/C++: Calculer la factorielle de ‘n'(Exemple)

 calcul
{filelink=14167}

 
long double calcul_factorielle( register unsigned int n )
{
  long double f = 1;
  while ( n > 1 )
    f *= n--;
  return f;
}

No comments yet.

Leave a Comment