C++ molar mass calculator