When you have to convert a quantity you need to multiply by a fraction whose value is 1 but has different units of measurements.
In your case you have: [tex] \frac{1 g}{cm^{3} } [/tex]
You will have two fractions: one that transforms grams into kilograms and one that transforms cm³ into m³. You need to position the quantities in such a way you can eliminate the original ones, therefore:
[tex] \frac{1 g}{1 cm^{3} } \frac{10^{6} cm^{3} }{1 m^{3} } \frac{1 kg}{10^{3} g} [/tex]
Now, you can make the calculations and you get:
[tex] \frac{1g}{cm^{3} } [/tex] = [tex] \frac{ 10^{3} kg }{m^{3} } [/tex]
Therefore your answer is: 1000kg/m³