summaryrefslogtreecommitdiff
path: root/1553/CH16/EX16.2/16Ex2.sce
blob: 83bc253e570ec94e4a244b9697b4982c46032fec (plain)
1
2
3
4
5
6
7
8
9
10
11
//chapter 16 Ex 2
clc;
clear;
close;
//let pipes be A, B and C
t1=10; t2=12; //time taken by A and B to fill tank individually
t3=-20; //negative sign since time taken is to empty the tank
A1hour=1/t1; B1hour=1/t2; //part filled by A and B in 1 hour each
C1hour=1/t3;              //part emptied by C in 1 hour
ABC1hour=A1hour+B1hour+C1hour;    //part filled by all 3 pipes in 1 hour
mprintf("Thus the time taken by all pipes together to fill the tank is %.1f hours",1/ABC1hour);