//Example 6_4 clc(); clear; //To find the recoil velocity of the gun vgf //As we know that Momentum before = Momentum after //((m*vb0)+(M*vg0))=((m*vbf)+(M*vgf)) // As vb0=vg0=0 printf("The recoil velocity of the gun is Vgf=-(m/M)*Vbf")