//Body moving to the right v2=3 //m/sec u2=-10 //m/sec v2=4 //m/sec //Applying principles of conservation of momentum v1=((80*3)-100-40)/(80) //m/sec //Defination of coeff. of restitution gives e=(4-1.25)/(3+10) printf("\nv1=%.3f m/sec\ne=%.3f ",v1,e)