Assume there are 100g of the compound.
Mass of carbon:20.01g
Mass of oxygen:79.99g
Number of mole of carbon:20.01/12=1.6675mol
Number of mole of oxygen:79.99/32=2.4996875mol
Mole ratio between carbon and oxygen:
1.6675/1.6675:2.4996875/1.6675
=1:1.499062969
1x2:1.499062969x2
=2:2.998125937
≈2:3
Hence, the empirical formula:
C2O3