The first step we need to do is to pick our base, i.e.: a random value of our choosing that will let us change this from percentages to actual mass. For convenience's sake we can choose something like 100 g100g or 100 kg100kg or something of the like, using 100 g100g:
In 100 g100g, since any percentage of 100100 is that number, we have
70% 100g = m_Cl = 70g70%100g=mCl=70g
24%100g = m_C = 24g24%100g=mC=24g
6%100g = m_H = 6g6%100g=mH=6g
Now we need to divide these values by their molar masses, because then we'll know how much atoms we can find in a molecule. For practical purposes like this we say MM_Cl = 35.5 g*mol^-1MMCl=35.5g⋅mol−1, MM_C = 12 g* mol^-1MMC=12g⋅mol−1, MM_H = 1g*mol^-1MMH=1g⋅mol−1
So we have
n_Cl = m_Cl/(MM_Cl) = 70/35.5 = 1.97 ~= 2nCl=mClMMCl=7035.5=1.97≅2
n_C = m_C/(MM_C) = 24/12 = 2nC=mCMMC=2412=2
n_H = m_H/(MM_H) = 6/1 = 6nH=mHMMH=61=6
The empirical formula wants us to have all the values as indivisible integers, and since all of these values can divide by 2, we can reduce them from C_2H_6ClC2H6Cl to CH_3ClCH3Cl, which conveniently enough gave us a molecule that could exist from one that couldn't. (Why the first molecule can't exist and the last can is a matter for another time though, and if you have some grounding in organical chemistry, should be easy enough to see why, if not and you're curious just send me a message and I'll happy to explain why.)