Over millions of years the layers of sediment become squashed and form sedimentary rocks. The shells of dead marine organisms fall to the sea bed and become part of the sediment. Marine organisms used the dissolved carbon dioxide to make calcium carbonate for shells. Carbon dioxide dissolved in the oceans.