AS with all these problems, we assume (for simplicity) #100*g# of unknown compound.

And thus there are #(85.7%xx100*g)/(12.011*g*mol^-1)# with respect to carbon, i.e. #7.14*mol*C#

And #(14.3%xx100*g)/(1.00794*g*mol^-1)# with respect to hydrogen, i.e. #14.1*mol*H#.

And thus the #"empirical formula"#, the simplest whole number ratio that defines constituent elements in a species is #CH_2#.

Now the #"molecular formula"# is alway a whole number multiple of the #"empirical formula"#:

#"empirical formula"xxn# #=# #"molecular formula"#

So #(12.011*g*mol^-1+2xx1.00794*g*mol^-1)xxn=84*g*mol^-1.#

So #n=6#, and #"molecular formula"# #=# #6xxCH_2# #=# #C_6H_12#