summaryrefslogtreecommitdiff
path: root/3886/CH14/EX14.3/14_3.sce
blob: 12511782199a781e98fea85a8ca39ae00c5e4644 (plain)
1
2
3
4
5
6
7
8
//Two trains
//Taking the direction of motion of train A as positive
//let velocity of A be v m/sec
//Relative velocity=1.5*v
vA=20*((60*60)/(1000))  //kmph
//velocity of B
vB=-10*((60*60)/(1000))  //kmph
printf("\nVelocity of A=%.2f kmph\nVelocity of B=%.2f kmph",vA,-vB)