int fact( int n ) { int f; if ( n < 0 ) return 0; for ( f = 1; n > 1; --n ) f *= n; return f; }