Answer: 4.9 g/cm^3
Explanation.
!) Data
mass = 49 g
Volume = 10 cm^3
2) Formula
Density = mass / volume
Density = 49 g / 10cm^3 = 4.9 g/cm^3
This is a problem where you only need to know the formula and subtitute the numbers to calculate.
The formula of density is the very same definition: mass per unit of volume.
So, as you had the mass and the volume you just need to plug the values in the formula density = mass / volume.