The density of a cube is 3 #g/(cm^3)#. If its mass is 24 g, what is the length of each side of the cube?