How can the occurrence of fossils and their known age ranges be used to date rocks?

2 answers

I don’t understand the question, help?
A scientist finds a fossil in a rock. How can he tell how old the rock is?