Let total mass of the molecule = 100g
Mass of C in the molecule = 24.27g
Mass of H in the molecule = 4.07g
Mass of Cl in the molecule =71.65 g
Number of moles of C in molecule = 24.27/ molar mass of carbon = 24.27 /12 = 2.02
Number of moles of H in molecule = 4.07/ molar mass of hydrogen = 4.07 /1 = 4.07
Number of moles of Cl in molecule = 71.65/ molar mass of nitrogen = 71.65 /35.45 =2.02
Ratio of the number of moles of C, H & Cl
i.e.
C:H:Cl = 2.02 : 4.07 : 2.02 = 1:2:1
So the empirical formula will be..
CH2Cl
Empirical formula mass = 12.01+2+35.45 = 49.5 g
Now
n = Molecular mass/ empirical formula mass = 98.96/49.5 = 2
Molecular formula = n x empirical formula = 2(CH2Cl) = C2H4Cl2