C++ Which Number Doesn't Belong?
<p>I'm kind of a beginner with programming, but while writing a program of my own, I ran into a roadblock that I can't seem to get around. </p>

<p>Anyway, given a set of numbers like these in an array:</p>

<pre><code>4
14
24
27
34
</code></pre>

<p>You can see how all of the numbers except one have a 4 in the ones place. How would I write a function that can return the number that is different in the ones place, 27 in this case? The numbers would be different every time the program is run, but due to the scenario, 4 of them will always have the same digit in the ones place.  They wouldn't necessarily be in numerical order. </p>

<p>I couldn't seem to find a way to do it mathematically, nor was I able to find anything through search. Any ideas?</p>
