Hi.
I'll show you how to analyze this kind of problem so you can do this
on your own.
You have a mass quantity, a density, cost per unit volume and you want the total cost. The best way to tackle these problems is to analyze the units (dimensions) involved.
Look at the dimensions and work backwards:
 You want the total cost C, but cost is only expressed in terms of volume because of the rate R in cost per unit volume V. So C = RV. You know R but you need V now.
 To get V, you have density D (mass M per unit volume V) so V = M/(M/V) = M/D. You know both M and D.
So you can put these together: C = RV, V = M/D. That means C = RM/D.
Now let's doublecheck with the units themselves:
RM/D = (centavos / cm^{3}) (g) / (g / cm^{3}) = centavos because the others cancel.
That confirms our units. So now all that is left is to replace the variables R, M, and D with the actual numbers in the question and calculate C.
Stephen La Rocque>
