summaryrefslogtreecommitdiff
path: root/1553/CH18/EX18.7/18Ex7.sce
blob: 64cd2ef22442330bc25ec684b0a5a22c543dfc73 (plain)
1
2
3
4
5
6
7
8
9
//chapter 18 Ex 7

clc;
clear;
close;
l1=100; l2=120; s1=72; s2=54;
sRelative=(s1-s2)*5/18;     //Addition of speeds since in opposite direction
tPass=(l1+l2)/sRelative;
printf("The time taken by trians to pass each other is %d sec",tPass);