//example 6.6 //calculate the allocations to each project purpose clc;funcprot(0); //given t=240; //total cost of project(million rupees) s=[32 88 72]; //separable cost eb=[40 138 112]; //estimated benifit sp=[47 104 101]; //alternate single purpose cost //using remaining benifit method ts=s(1)+s(2)+s(3); //total separable cost tj=t-ts; //total joint cost w=0; for i=1:3 if eb(i)