Please choose the correct answer to the question: There are several different types of rock. Each type of rock is formed under different conditions. How are sedimentary rocks, such as shale and sandstone, formed?

Answer1: Particles are heated by the Sun. Answer2: Particles are melted together by magma. Answer3: Particles are compressed into layers. Answer4: Particles are changed into liquids.

Answer format: answer1/answer2/answer3/answer4
Answer: answer3