summaryrefslogtreecommitdiff
path: root/1553/CH18/EX18.3/18Ex3.sce
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH18/EX18.3/18Ex3.sce')
-rw-r--r--1553/CH18/EX18.3/18Ex3.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/1553/CH18/EX18.3/18Ex3.sce b/1553/CH18/EX18.3/18Ex3.sce
new file mode 100644
index 000000000..52f6f160a
--- /dev/null
+++ b/1553/CH18/EX18.3/18Ex3.sce
@@ -0,0 +1,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);