Am doing a computer programming project for fun (and to help myself learn C) and I can't figure out how to calculate the mass of an element, say C-12, given only the mass of a proton, neutron, electron, and dalton. I'm getting a result of 12.098940 despite the result supposedly being exactly 12. If you have any ideas, It'd be most appreciated. I've been working on this throughout the last two days, so hoping to finally resolve this...
I'll admit my only experience with chem is my high-school curriculum in it, so I forget a lot of what I'mma need for this project of mine.
Also sorry if this is the wrong forum to post this in, didn't really know where to. Guess probably the undergrad one, but I dunno.