Skip to content

Latest commit

 

History

History
10 lines (10 loc) · 559 Bytes

hint6-2.md

File metadata and controls

10 lines (10 loc) · 559 Bytes

An elegant way to translate between the atomic number (z-value) of a given atom and its mass is to prepare a static array of the masses of the most abundant isotope of each element. I suggest preparing a header file containing a global array, e.g.:

  double masses[] = {
  0.0000000, 
  1.007825, 
  4.002603,  
  6.015123,
  ...};

Note that, for example, masses[1] = 1.007825, which is the correct atomic mass for a hydrogen atom.