Determination of molecular formulas by elemental analysis and molar mass

The principle

One mole of unknown objects, all identical, contain 2 moles of wheels and 1 mole of frames. What objects are they?

Click on the image !

One mole of molecules ( = the molar mass) of a substance contains 2 moles of H atoms ( = 2g) and one mole of O atoms (= 16 g). What substance is it?

Click on the image !

Example

The molar mass of a substance is $30\; \frac{g}{mol}$. The elemental analysis reveals $80\;\% \;C$ and $20\;\% \;H$ : What substance is it?

In one mole (=$30\; g$), there are $\frac{30\cdot 80}{100}= 24\; g\; C = 2\; mol\; C$ $\frac{30\cdot 20}{100}= 6\; g\; C = 6\; mol\; H$ It is ethane ! $C_2H_6$ !