Well, lets try this with an example run of what i'm doing.
The equation itself is (xy/z)n^2y^2) = a. Sum the digits of "a"
or
x | y | z | x^2 | y^2 | a
1 * 2 / 3 * 1^2 * y^2 = 2.6
then
(ignoring the decimal point)
2 + 6 = 8
as for ty98, it has multiple questions in it in fact, and I would rather you said something useful, as opposed to a statement that doesn't refer to the [multiple] questions in any way, shape, nor form.
Janlan, your method works like a charm, but how do I apply it to numbers that have decimal places? Or some way to remove the decimal place altogether, since the "places" of the numbers do not matter once the equation is run. I.E. it doesn't matter if its 2.6, .26, 26., I just need to extract the digits.
Also, it needs to scale to the number size itself, as the answers could be anywhere in length from 1 to millions of digits long with decimals and without D=>
For example, the first run could give me an answer of 36, where the second run could give me an answer of 30023123764533.654639.
[update]
Later Update: I think this:
http://www.cplusplus.com/reference/std/locale/numpunct/grouping/ is what i'm aiming for? trying it out to see, will post results in-case anyone else is travelling this winding road :P
[update]
Looks like it takes a string value and seperates it into sets of n characters... Not quite what i'm looking for but getting closer.
[update]
Good lord, after a bit more research i've noticed that "Sum of Digits" math, something that is just a curiosity, has Number Theory conferences and symposiums dedicated to it.... Perhaps this is out of my league.
[update]
And bingo. A couple of years ago the answer was posted:
http://www.cplusplus.com/forum/beginner/4988/
Now to see about the random size + decimal problem, though it looks like this might solve that too.
:P that only took 6 hours of research ^_^.
Doing final tests before changing to [solved]