Old stuff/ecole_etude_fac_de_pau/licence_2/struct/tp6/factorielle.c~
(Deskargatu)#include <stdio.h>
#include <stdlib.h>
double fact(int n)
{
if (n<0)
{
printf "impossible";
return 0;
}
if (n<2)
{
return 1;
}
return (fact(n-1)*n);
}
int main()
{
int n;
printf "entrez une valeur : ";
scanf("%d",&n);
printf("Resultat=%d\n",fact(n));
}