If you look at the periodic table, underneath each element it give you the atomic mass, which has the units g/mol. So CO2 have a molecular mass (MM) of those combined atomic masses.
The MM for CO2 would be...
12.01 g/mol + 2(16.00 g/mol) = 44.01 g/mol
This can be used as a conversion to change from moles to grams.
8 mol * (44.01 g / 1 mol) = 352.08 g or 6 x 10 to the 2 g for the significant figures (sig figs) at are shown in your problem.
You may have just typed 8 instead of 8.0 or 8.00 which would change your sig figs. It is all important to right now all your zeros, since almost all chemistry calculations involve significant figures.
I solved the above equation using dimensional analysis and had to cancel out the units, in case this is your first chemistry class.
I hope I helped!