--> //initializations

--> Ko=0.5 //(coefficient)
 Ko  = 

   0.5


--> Y=16.5 //KN/m^3 (unit weight)
 Y  = 

   16.5


--> z=2 //m (depth)
 z  = 

   2.


--> //calculations

--> nz=Y*z // (geostatic stress at z)
 nz  = 

   33.


--> nx=Ko*nz //(geoststic stress at x)
 nx  = 

   16.5


--> //results

--> printf('geostatic stresses=%f \n %f',nz,nx) //KN/m^2
geostatic stresses=33.000000 
 16.500000
