The solution would be like this for this specific problem:
Moles of carbon = 58.8 / 12 = 4.9
Moles of hydrogen = 9.8 / 1 = 9.8
Moles of oxugen = 31.4 / 16 m= 1.96
Ratio 4.9 / 1.96 = 2.5 9.8 / 1.96 = 5.0 1.96 / 1.96 = 1
Simplest formula = C5H10
I hope this helps and if you have any further questions, please don’t hesitate to ask again.