diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1553/CH16/EX16.3/16Ex3.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '1553/CH16/EX16.3/16Ex3.sce')
-rw-r--r-- | 1553/CH16/EX16.3/16Ex3.sce | 16 |
1 files changed, 16 insertions, 0 deletions
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
+
|