To solve this problem we will use the concept given on the calculation of volume in a sphere (for which we will apply the approximation of the earth) as well as the relationship between density, mass and volume, like this:
Mass of atmosphere [tex]m= 10^{19}Kg[/tex]
Density of Atmosphere [tex]\rho = 1kg/m^3[/tex]
Now the Volume would be,
[tex]\rho = \frac{m}{V} \rightarrow V= \frac{m}{\rho}[/tex]
[tex]V = \frac{10^{19}}{1}[/tex]
[tex]V = 10^{19}m^3[/tex]
The volume geometrically can be expressed as
[tex]Volume = A*h \rightarrow A = Area, h = height[/tex]
Atmosphere is spread all over earth therefore the sphere surface area (of earth)
[tex]A = \pi d^2 \rightarrow d =[/tex] Diameter of the earth [tex](10^{7}m)[/tex]
[tex]A = \pi (10^7)^2[/tex]
[tex]A = 3.14*10^{14}[/tex]
Now calculating the height:
[tex]V = Ah[/tex]
[tex]10^{19} = 3.14*10^{14}h[/tex]
[tex]h = 0.318*10^5m[/tex]
[tex]h = 31km[/tex]
This value is estimated since the approximation of a sphere to the earth was made, and this, as we well know, does not comply with that approximation in detail.
We must add that the atmosphere decreases with the height so the value of 31 km is given for the first layer of the atmosphere.