Chemistry
posted by Elie .
A hydrocarbon gas burned completely in O2 to give CO2 and H2O. It was found that 1volume of a hydrocarbon gas at STP produced 2volumes of CO2 and 3 volumes of steam at STP. What is the emperical formula of this gas? Please help me on how to work out the formula of the gas.

1CxHy + O2 ==> 2CO2 + 3H2O
If all are in the gaseous state, volumes are the same as mols; therefore, x must be 2 and y must be 6.