--> //initializations

--> wl=25 //% (liquid limit)
 wl  = 

   25.


--> wp=15 //% (plastic limit)
 wp  = 

   15.


--> If=12.5 //% (flow index)
 If  = 

   12.5


--> w=20 //% (water content)
 w  = 

   20.


--> //calculations

--> Ip=wl-wp // (plasticity index)
 Ip  = 

   10.


--> It=(Ip*100)/If // (toughness index)
 It  = 

   80.


--> Il=((w-wp)*100)/Ip // (liquidity index)
 Il  = 

   50.


--> Ic=((wl-w)*100)/Ip // (relative consistency)
 Ic  = 

   50.


--> //results

--> printf('plastic index=%d',Ip) //%
plastic index=10
--> printf('toughness index=%d',It) //%
toughness index=80
--> printf('liquidity index=%d',Il) //%
liquidity index=50
--> printf('relative consistency=%d',Ic) //%
relative consistency=50