How do you Find the mass (in g) of Carbon in 2.980 g Carbon dioxide?

I saw the question asked before but couldn't find a solution.