Let's try to work this through.
color(blue)("1) Assume 100 g sample and multiply by percentages to find mass of each element")
C = 39.99g
H = 6.79g
O = 53.28g
color(blue)("2)Take mass of each element and convert to moles using molar mass from periodic table")
"Carbon"->(39.99g)/(1)*(1 "mol")/(12g) = 3.33" mol C"
"Hydrogen"->(6.79g)/(1)*(1 "mol")/(1.00g) = 6.79" mol H"
"Oxygen"->(53.28g)/(1)*(1 "mol")/(16g) = 3.33" mol O"
color(blue)("3)Divide the moles by the smallest mole number of the three values")
"Carbon"-> (3.33)/(3.33) = 1
"Hydrogen"->(6.79)/(3.33) = 2.03 approx 2
"Oxygen"->(3.33)/(3.33) = 1
color(blue)("4)Write out the element with their respected whole number mole ratios")
C_1H_2O_1
Answer:C_1H_2O_1