//railway carriage //refer fig. 14.20 //Velocity of components of train are v1x=96 //kmph v1y=0 //Velocity components of bullet are //v2x=0.9848*v //v2y=0.1736*v //Component of relative velocity of B w.r.t. A are //vrx=0.9848*v-96 //vry=0.1736*v //Direction of relative velocity alpha with x-axis //tand(alpha)=((vry)/(vrx)) //thus v=183.96 //kmph //consider motion in y direction vry=0.1736*51.1 //m/sec //Time period (t) t=(1.8)/(0.1736*51.1) //sec printf("\nv=%.2f kmph\nt=%.3f sec",v,t)