summaryrefslogtreecommitdiff
path: root/3648/CH6/EX6.3/Ex6_3.sce
blob: ac0de77062714991e0635fe2143b8f0c55490a99 (plain)
1
2
3
4
5
6
7
8
9
10
11
//Example 6_3
clc();
clear;
//To find out how fast and the direction car moving
m1=30000   //units in Kg
m2=1200    //units in Kg
v10=10   //units in meters/sec
v20=-25   //units in meters/sec
vf=((m1*v10)+(m2*v20))/(m1+m2)  //unis in meters/sec
printf("The car is moving at vf=%.2f Meters/sec\n",vf)
printf("The positive sign of vf Indicate the car is moving in the direction the truck was moving")