Find the molecular weight of the compound then divide the total mass of each element by it and multiply by 100.