Alright, I'm not sure how to explain this clearly, but I'll give it a shot.
I want to make a program that will tell me the molar mass of molecules. I don't know how separate whether an integer or a variable will come next.
For instance, I give all my elements values, like
double c = 12;
couble h = 1;
double o = 16;
I don't know how to make the program know how to evaluate a person inputting H2O as well as doing OH. How can I make it take the number in the middle?
Idk, I know I'm not too clear with this and I don't have any code to show you because honestly I don't know where to start.