1. ## Comparing Digits!!!

Ok, lets say i have the number 13112. How do i compare the digits of this number to see if one number (in this case the number "1") appears in over 50% of the number. In this case the number "1" appears 3/5 digits so it appears over 50%. Anyone know how to do this tastk thanks

2. I'd transform it into a string and check the digit occurance 1 by 1.
Code:
```char TempChar;
int Number = 13112
std::stringstream Stream(Number);
int Occurance[10] = {0};

while(!Stream.eof())
{
Stream >> TempChar;
Occurance[TempChar - '0']++;
}```
Note: Code has not been tested.

3. Originally posted by Magos
I'd transform it into a string and check the digit occurance 1 by 1.
Or leave it as an int and check each digit:
Code:
```int TempChar;
int Number = 13112
int Occurance[10] = {0};

while(Number > 0)
{
TempChar = Number % 10;
Number /= 10;
Occurance[TempChar]++;
}```
Note: Code has not been tested, but I've done it before. It should be fine.

4. >How do i compare the digits of this number to see if one number (in this case the number "1") appears in over 50% of the number.
Numeric profiling can result in riots if you aren't tactful. I suggest starting a fight between the 1's and the other digits. If there are any 1's at the end then they probably had superior numbers.

>In this case the number "1" appears 3/5 digits so it appears over 50%.
Be careful though. 7's can hide pretty well behind 2's. A cursory glance isn't always enough.

5. Originally posted by Prelude
suggest starting a fight between the 1's and the other digits. If there are any 1's at the end then they probably had superior numbers.
That's abserd! This gives a huge disadvantage to the slow and sluggish 8's. And we all know that 6's and 9's tend to team up.

6. Originally posted by Prelude
>How do i compare the digits of this number to see if one number (in this case the number "1") appears in over 50% of the number.
Numeric profiling can result in riots if you aren't tactful. I suggest starting a fight between the 1's and the other digits. If there are any 1's at the end then they probably had superior numbers.
I don't know about that. Every fight between the "others" and either Hercules, Xena, or Arnold resulted in the superior numbers being soundly trounced. You need to keep track of the realities of the world, Prelude.

7. >Every fight between the "others" and either Hercules, Xena, or Arnold resulted in the superior numbers being soundly trounced.
Well, I didn't mention digit placement because it adds quite a bit of complexity. You see, 10110 is considerably more powerful than 3002. By assuming that greater numbers means greater power you can save yourself the trouble of measuring total value of the hoards. Besides, 2 and 3 aren't heroic at all, unlike 5, who has some m4d l33t sk1llz. And of course 9 is god-like; the Hercules of the decimal system. But don't forget 1 and 0 when they join forces, whooo.

>You need to keep track of the realities of the world, Prelude.
That's something I don't hear much.

8. Originally posted by Prelude
And of course 9 is god-like; the Hercules of the decimal system.
But don't forget it's omnipotence over the octal system, where he's unimaginably powerful! God-like isn't even close!

9. >But don't forget it's omnipotence over the octal system, where he's unimaginably powerful!
Unfortunately, 9 causes spacial anomalies with his very existence in the octal system, so any estimates of his power are mere speculation.

10. Originally posted by Prelude
And of course 9 is god-like; the Hercules of the decimal system. But don't forget 1 and 0 when they join forces, whooo.
bah, you're so wrong... when 1 and 0 join forces, they're weaker than 1 alone... the 1 tries to fight, but the 0 does absolutely nothing... and the 9 just comes along and only destroys the 1 because the 0 couldn't be any worse off...

-and-

Originally posted by WaltP
You need to keep track of the realities of the world, Prelude.

11. Bah, if I were a mod I would've closed this thread for off-topic spam

12. ## lol!

i dunno, personally i think 6 is the strongest, with all that arm training and weight training. i mean he's been walking on his hands for ages...

13. Originally posted by Magos
Bah, if I were a mod I would've closed this thread for off-topic spam
you must not mod many forums... it's hard to stop threads when they get offtopic, because most threads would be closed within a few posts...

14. ## Re: lol!

Originally posted by heat511
i dunno, personally i think 6 is the strongest, with all that arm training and weight training. i mean he's been walking on his hands for ages...
sure 6 usually teems up with 9 but now 6 is upset with seven because 7 8 9.

15. ## Re: Re: lol!

Originally posted by grib
sure 6 usually teems up with 9 but now 6 is upset with seven because 7 8 9.
That cannibal!! This wouldn't happen in binary!! A much more civilized system.