The density of the substance is the ratio of its mass over the space it occupies. In mathematical equation, this can be expressed as,
ρ = m / v
where ρ is density, m is mass, and v is volume.
Substituting the known values from the given,
ρ = (45 g) / (8 cm³)
ρ = 5.625 g/cm³
ANSWER: 5.625 g/cm³