summaryrefslogtreecommitdiff
path: root/3648/CH3/EX3.10/Ex3_10.sce
blob: 2b0565feb9382ac1ad1f22f4ddf321a07634b7a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Example 3_10
clc();
clear;
//To find out how high does it goes and its speed and how long will it be in air 
vf=0  //units in meters/sec
v0=15  //units in meters/sec
a=-9.8  //units in meters/sec^2
y=(vf^2-v0^2)/(2*a)   //units in meters
printf("Distance it travels is y=%.1f meters\n",y)
vf=-sqrt(2*a*-y)  //units in meters/sec
printf("The speed is vf=%d meters/sec\n",vf)
t=vf/(0.5*a)  //units in sec
printf("Time taken is T=%.2f sec",t)