blob: 52f6f160ab47d1ce14f1825460af1f716a322f55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//chapter 18 Ex 3
clc;
clear;
close;
d_b=180; t1=8; t2=12; t=t1+t2;
length_t=(d_b/t)/(1/t1-1/t);
s_t=length_t/t1;
s=s_t*18/5;
printf("The length of train is %d meter and its speed is %d km/hr",length_t,s);
|