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

clc;
clear;
close;
sTrain=59; lTrain=220; sMan=7;
sRelative=(sTrain+sMan)*5/18;  //addition of speed since opposite direction
t=lTrain/sRelative;
printf("The time taken by train to pass the man is %d sec",t);