November 29, 2024, 03:40:09 AM
Forum Rules: Read This Before Posting


Topic: Calculating the mass of an isotope  (Read 2282 times)

0 Members and 1 Guest are viewing this topic.

Offline Aurelian

  • Very New Member
  • *
  • Posts: 2
  • Mole Snacks: +0/-0
  • Gender: Male
Calculating the mass of an isotope
« on: January 06, 2020, 11:42:46 PM »
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.

Offline AWK

  • Retired Staff
  • Sr. Member
  • *
  • Posts: 7976
  • Mole Snacks: +555/-93
  • Gender: Male
Re: Calculating the mass of an isotope
« Reply #1 on: January 07, 2020, 01:34:37 AM »
AWK

Offline Aurelian

  • Very New Member
  • *
  • Posts: 2
  • Mole Snacks: +0/-0
  • Gender: Male
Re: Calculating the mass of an isotope
« Reply #2 on: January 07, 2020, 01:47:25 AM »
Ah, that'd explain it... It's late right now, but I'll take a look at it tomorrow. I'll see if I can figure out how to adjust for this, might post something again later on. Thanks.

Sponsored Links