Profiles of the Atmosphere, science homework help

Suppose the atmosphere has its temperature equal to 300 K and pressure 1000 hPa at z=0. The temperature profile falls linearly with a lapse rate of 6 K km^-1 up to 10 km. Above 10 km the temperature is constant. What is the pressure as a function of z?

Answer is attached. Need help working it out. 

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now