clc
clear

h=100;
v0=50;
g=9.81;

t=height_time(h,v0,g);
disp(t)

function t= height_time(h,v0,g)
t1=(v0+sqrt(v0^2-2*g*h))/g;
t2=(v0-sqrt(v0^2-2*g*h))/g;
t=[t1 t2];

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: