Neutrons produced by interactions of solar-flare-accelerated ions with the solar atmosphere slow down and are captured by hydrogen to produce deuterium with the binding energy appearing as a 2.223 MeV gamma ray. Those gamma rays that escape toward Earth without Compton scattering with the solar atmosphere appear as the 2.223 MeV neutron-capture line. Those gamma rays that Compton-scatter lose energy and can appear at Earth in a continuum at energies below the line energy. We study this continuum in detail, using a realistic model for accelerated-ion propagation and interaction in a solar-flare magnetic loop and transport of the reaction products. We calculate the angle-dependent Compton-scattered continuum yield and spectral shape and show how it depends on the various parameters of the loop model, such as accelerated-ion and ambient-medium compositions, accelerated-ion kinetic-energy spectrum, magnetic-loop convergence and pitch-angle scattering of the ions due to MHD turbulence in the corona. We find that while the angular distribution of the interacting ions and the depth of neutron production can vary significantly, the depth distribution of neutron capture does not. The shape of the continuum below 1 MeV is quite variable with heliocentric angle and ion power-law spectral index but is less so above 1 MeV. We compare ratios of the >1 MeV scattered-continuum flux to the neutron-capture line flux calculated using the loop model with measurements of this ratio. The measurements were obtained by fitting gamma-ray spectra from several solar flares observed with the Solar Maximum Mission Gamma-Ray Spectrometer and the Reuven Ramaty High-Energy Solar Spectroscopic Imager. We find that the measured and calculated ratios are consistent, providing support for the loop-model describing ion interactions in solar flares.