The density of iron is approximately 7.8 g/cm³. The density of water is approximately 1 g/cm³. The density of mercury is approximately 13.6 g/cm³. Since the density of iron (7.8 g/cm³) is greater than the density of water (1 g/cm³), the iron nail sinks in water. Since the density of iron (7.8 g/cm³) is less than the density of mercury (13.6 g/cm³), the iron nail floats on mercury.