So I have, for example, a string such as this C3H20IO
What I wanna do is split this string so I get the following:
Array1 = {C,H,I,O}
Array2 = {3,20,1,1}
The 1
as the third element of the Array2
is indicative of the monoatomic nature of the I
element. Same for O
. That is actually the part I am struggling with.
This is a chemical equation, so I need to separate the elements according to their names and the amount of atoms there are etc.
Thanks,
1,1
indicates monoatomicI
andO
– rock321987 22 hours agoMap
. Hope it will help you! – mmuzahid 21 hours ago