Study the effect of density dependence of symmetry energy on fragmentation in heavy-ion collisions at intermediate energies