An exact solution of partial quasipotential equations for spin-0 and spin-½ particles with superposition of N δ-potentials is obtained. Based on this, a method for an approximate solution using a superposition of δ-potentials instead of an arbitrary smooth potential is presented. A smooth analytic potential allowing existence of resonant states is considered. Scattering cross section dependences on various potential parameters are investigated.