--> //initializations

--> wl1=65 //% (liquid limit at A) 
 wl1  = 

   65.


--> wl2=35 //% (liquid limit at B)
 wl2  = 

   35.


--> wp1=25 //% (plastic limit at A)
 wp1  = 

   25.


--> wp2=20 //% (plastic limit at B)
 wp2  = 

   20.


--> w1=35 //% (water content at A)
 w1  = 

   35.


--> w2=25 //% (water content at B)
 w2  = 

   25.


--> G1=2.7 // (specific gravity at A)
 G1  = 

   2.7


--> G2=2.65 // (specific gravity at B)
 G2  = 

   2.65


--> S1=100 //% (degree of saturation at A)
 S1  = 

   100.


--> S2=100 //% (degree of saturation at B)
 S2  = 

   100.


--> Dw=1.0 //gm/ml (unit weight of water)
 Dw  = 

   1.


--> //calculations

--> //for soil A

--> PI1=wl1-wp1 //% (plasticity index at A)
 PI1  = 

   40.


--> e1=(w1/100)*G1 // (void ratio at A)
 e1  = 

   0.945


--> Dd1=(G1*Dw)/(1+e1) //gm/ml (dry density at A)
 Dd1  = 

   1.3881748


--> D1=Dd1*(1+(w1/100)) //gm/ml (bulk density at A)
 D1  = 

   1.874036


--> //for soil B

--> PI2=wl2-wp2 //% (plasticity index at B)
 PI2  = 

   15.


--> e2=(w2/100)*G2 // (void ratio at B)
 e2  = 

   0.6625


--> Dd2=(G2*Dw)/(1+e2) //gm/ml (dry density at B)
 Dd2  = 

   1.593985


--> D2=Dd2*(1+(w2/100)) //gm/ml (bulk density at B)
 D2  = 

   1.9924812


--> //results

--> printf('(1) Plasticity index of soil A is more than that of soil B, it has more clay particles')
(1) Plasticity index of soil A is more than that of soil B, it has more clay particles
--> printf('(2) Bulk Density of soil B is more than that of soil A')
(2) Bulk Density of soil B is more than that of soil A
--> printf('(3) Dry Density of soil B is more than that of soil A')
(3) Dry Density of soil B is more than that of soil A
--> printf('(4) Void Ratio of soil A is more than that of soil B')
(4) Void Ratio of soil A is more than that of soil B