How to determine the tens digit of a number in C++
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1397737/how-to-get-the-digits-of-a-number-without-converting-it-to-a-string-char-array">How to get the digits of a number without converting it to a string/ char array?</a>  </p>
</blockquote>



<p>I am stuck doing this task in C++; what I want to do is to figure out the the units digit and the tens digits of any number given by the user.</p>

<p>For example, if the number is 9775, the units digit is obtained as <code>9775 % 10</code>,
but I am stuck finding the tens digit.</p>
