The compound has 20.1% hydrogen and 79.9% carbon by mass. It is assumed that no other element is present in the compound.
The molar mass of hydrogen H is 1.008 and the molar mass of carbon C is 12.011. 100 g of the compound has 20.1 g of H and 79.9 g of C. 20.1 g of H is equivalent to `20.1/1.008 = 1675/64` moles and 79.9 g of C is equivalent to approximately 6.6522 moles. The chemical formula that would result from this is a very complex one. Assume that the compound has 20% hydrogen and 80% carbon. The ratio of hydrogen to carbon in this case is `(20/1)/(80/12) = 3` giving a chemical formula of `H_3C` .