//defining constant
//Bomber and fighter plane simulation
yF = 50xF = 0vF =20t = 12
//matrix for values of xB and yB
xB = [80 90 99 108 116 125 133 141 151 160 169 179 180]
yB = [0 -1 -5 -9 -15 -18 -23 -29 -28 -25 -21 -20 -17]
for i=1:t+1
  if i>12 then
          disp("Target escaped...")
  else
      Distance=sqrt(((yB(i)-yF)**2)+((xB(i)-xF)**2))
      xF = (xF + vF*((xB(i)-xF)/Distance))//t+1 distance
      yF = (yF + vF*((yB(i)-yF)/Distance))
      if Distance <= 10.0 then
          disp("The bomber is caught at time interval "+ string(i)+" and at distance "+string(Distance)) 
          break   
      end 
  end
end