10cm^3 of aa hydrocarbon was completely combusted in 200cm^3 of O2. It was found that there was 20cm^3 of O2 remaining and the volume of CO2 produced was 120cm^3. Determine the formula of the hydrocarbon.

.......CzHy + O2 ==> CO2 + H2O

start...10...200.....0.....0
end......0....20....120.....?
used....10...180.............
10cc CzHy x (ratio) = 120cc
so the ratio must be 120/10 = 12 and the equation becomes
CzHy + O2 ==> 12CO2 + H2O
and this means z must be 12; ow the equation is
C12Hy + O2 ==> 12CO2 + H2O

What's the ratio for O2?
10 cc C12Hy x ratio = 180 cc O2.
So ratio must be 18 and the equation becomes
C12Hy + 18O2 ==> 12CO2 + H2O
Now balance the O atoms
C12Hy + 18O2 ==> 12CO2 + 12H2O
Use that to balance H
C12H24 + 18O2 ==> 12CO2 + 12H2O
Check my thinking.