clc //initialisation of variables a=1/9//m/sec^2 t=180//sec h=20//m/sec q=9//m/sec //CALCULATIONS S=h*t-(((t)^2)/(q*2))//m //RESULTS printf('the distance the train travelled after braking=% f m',S)