Exchange contribution in the scattering of electrons by atoms and positive ions