--> //initializations

--> e1=0.8 //(void ratio in borrow area A)
 e1  = 

   0.8


--> e2=0.7 //(void ratio in borrow area B)
 e2  = 

   0.7


--> w1=0.20 //(water content in A)
 w1  = 

   0.2


--> w2=0.15 //(water content in B)
 w2  = 

   0.15


--> V=10000 //m^3 (total volume)
 V  = 

   10000.


--> D=2 //Mg/m^3 (bulk density)
 D  = 

   2.


--> w3=0.22 //(placement water content)
 w3  = 

   0.22


--> G=2.65 //(specific gravity)
 G  = 

   2.65


--> g=9.81 //
 g  = 

   9.81


--> C1=200 //per/100m^3 (cost for A)
 C1  = 

   200.


--> C2=220 //per/100m^3 (cost for B)
 C2  = 

   220.


--> Yw=1 //Mg/m^3 (unit weight of water)
 Yw  = 

   1.


--> //calculations

--> //Borrow area A

--> Dd1=(G*Yw*g)/(1+e1) //(dry density)
 Dd1  = 

   14.4425


--> Ws1=Dd1/1 //(dry weight/m^3)
 Ws1  = 

   14.4425


--> // In embankment

--> Dd2=(D*g)/(1+w3) //(dry density)
 Dd2  = 

   16.081967


--> Ws2=Dd2/1 //(dey weight/m^3)
 Ws2  = 

   16.081967


--> V1=Ws2/Ws1 //(volume of soil required)
 V1  = 

   1.1135169


--> Ca=(C1*V1)/100 //(cost of soil)
 Ca  = 

   2.2270337


--> //Borrow area B

--> Dd3=(g*G*Yw)/(1+e2) //(dry density)
 Dd3  = 

   15.292059


--> Ws3=Dd3/1 // (dry weight/m^3)
 Ws3  = 

   15.292059


--> V2=Ws2/Ws3 // (volume of soil required)
 V2  = 

   1.0516548


--> Cb=(C2*V2)/100 //(cost of soil)
 Cb  = 

   2.3136406


--> //results

--> printf('A is more economical')
A is more economical