From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 1553/CH16/EX16.3/16Ex3.sce | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 1553/CH16/EX16.3/16Ex3.sce (limited to '1553/CH16/EX16.3/16Ex3.sce') diff --git a/1553/CH16/EX16.3/16Ex3.sce b/1553/CH16/EX16.3/16Ex3.sce new file mode 100644 index 000000000..5a2ccc42c --- /dev/null +++ b/1553/CH16/EX16.3/16Ex3.sce @@ -0,0 +1,16 @@ +//chapter 16 Ex 3 +clc; +clear; +close; +//let pipes be A and B +t12=12; //time taken by A and B to fill tank together +AB1hour=1/t12; //part filled by both in 1 hour +//Let reservoir be filled by pipe 1 in x hours, thus other in (10+x)hours, thus the equation that is formed is (1/x)+1/(10+x)=1/12; on solving we get +mycoeff=[-120 -14 1]; +p=poly(mycoeff,"x","coeff"); +r=roots(p); +v=int32([20 -6]); +a=v(1); b=v(2); +if a>0 then mprintf("Thus the time taken by both pipes individually are %d hours and %d hours respectively to fill the tank",a,a+10); +end + -- cgit