//Direct central impact //Refer fig. 18.3 u1=6 //m/sec u2=-10 //m/sec //Principle of conservation of momentum //2*v1+v2=2 //From the defination of coefficient of restitution //v2-v1=12.8 //solving v1=-3.6 //m/sec v2=12.8-(-v1) //m/sec printf("\nv1=%.2f m/sec\nv2=%.2f m/sec",v1,v2)