Hello
I'm trying to make a chemistry-program that's going to calculate the mass of an group of atoms.
It is however hard to make it work. First I give C a value of 12 and O a value of 6. To this point everything is fine, but now I want to be able to write CO2 and have the program understand that it's supposed to take the value of C and add it to the value of O times two.
Do you have any idea on how I should do?
I'm trying to make a chemistry-program that's going to calculate the mass of an group of atoms.
It is however hard to make it work. First I give C a value of 12 and O a value of 6. To this point everything is fine, but now I want to be able to write CO2 and have the program understand that it's supposed to take the value of C and add it to the value of O times two.
Do you have any idea on how I should do?
Comment