clc //initialisation of variables p1=7.8//ft p2=6.0//ft p3=7.4//ft p4=6.5//ft p=7.6//ft h=1.0//ft h1=6.7//ft p5=3.3//ft //CALCULATIONS D=p1-p2//mgd D1=p1-p3//mgd D2=p-p4//mgd D3=p4+h//mgd D4=h1-p5//mgd //RESULTS printf('the demand is taken =% f mgd',D3)