Carbon atom has two isotopes
relative abundance of one isotope = 98.89% = 98.89 / 100 = 0.9889
As this isotopes have 6 neutrons and 6 protons, and there sum is equal to the mass of that isotope = 6 + 6 = 12amu
And other isotope have relative abundance = 1.11% = 1.11/100 = 0.0111
And mass of that isotope = 7 neutrons + 6 protons = 13amu
Now, average atomic mass of carbon = (0.9889 x 12) + (0.0111 x 13) =11.8668 + 0.1443 = 12.0111 = 12.0 = 12