Prova anche questo
codice:
int fatt(int x) { return (x <= 0) ? 1 : x * fatt(x-1); }
Ciao.