carbon = 42.1%
hydrogen = 6.5%
oxygen = 51.4%
First lookup the molar mass of carbon, hydrogen, and oxygen.
mass of carbon = 12.0107
mass of hydrogen = 1.00794
mass of oxygen = 15.999
Now calculate the molar mass of each element in sucrose multiplying the atomic weight of each element by the number of times the element is used.
carbon = 12 * 12.0107 = 144.1284
hydrogen = 22 * 1.00794 = 22.17468
oxygen = 11 * 15.999 = 175.989
Calculate the molar mass of sucrose by adding the mass of each element used.
144.1284 + 22.17468 + 175.989 = 342.2921
Finally, calculate the percentage by mass of each element by dividing the mass used for each element by the total mass of sucrose.
carbon = 144.1284 / 342.2921 = 0.421068 = 42.1%
hydrogen = 22.17468 / 342.2921 = 0.064783 = 6.5%
oxygen = 175.989 / 342.2921 = 0.514149 = 51.4%