//Example 7.7 g=9.80;//Acceleration due to gravity (m/s^2) h=20;//Magnitude of height (m) v_a=sqrt(2*g*h);//Final speed (m/s) printf('a.Final speed = %0.1f m/s',v_a) v_0=5;//Initial speed (m/s) v_b=sqrt(2*g*h +v_0^2);//Final speed (m/s) printf('\nb.Final speed = %0.1f m/s',v_b) //Openstax - College Physics //Download for free at http://cnx.org/content/col11406/latest