A compound containing carbon and hydrogen was found to contain 85.60% carbon and the rest hydrogen. what would be the empirical formula of them all the molecule?

A 100 gram sample of the compound contains 85.60 g C and 14.40 g H

moles C = 85.60/12.01 = 7.13
moles H = 14.40/1.008 = 1.43
Find the ratio of the two to each other with the smaller being no less than 1. The easy way to do this is to divide the smaller number by itself, then divide the other number by the same. Round off to whole numbers for the empirical formula.
C = 7.13/1.43 = 4.99 rounds to 5
H = 1.43/1.43 = 1.00
Empirical formula if CH5; however, I can tell you there is no such thing. The numbers in the problem are not quite right for a "real" compound but this shows you how to work such a problem.