Elastic and inelastic scattering of 12C ions at intermediate energies