8 g of sulfur was heated with 28 g of iron, to determine the mass of the substance obtained.

Iron reacts with sulfur to form iron sulfide.
Fe + S = FeS.
Determine the amount of moles of sulfur and iron.
n (S) = m / Mr = 8 g / 32 g / mol = 0.25 mol.
n (Fe) = 28 g / 55.85 g / mol = 0.5 mol.
There will be an abundance of iron, so the calculation is based on a shortage.
n (S) = n (FeS) = 0.25 mol.
The sulphide mass is.
m (FeS) = n • Mr = 0.25 mol • 87.9 g / mol = 22 g.

One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.