Gamma-ray multiplicities in ?-induced compound and precompound reactions