title: throwing away tens & hundreds columns of an int in C
body: <p>I want to test an integer value for its units column value only, I don't care about the tens or hundreds columns. The int value is a countdown timer </p>
  
  <p>So when the units column is 0 to 4 I want the screen to display something, when the units is 5 to 9 I want the screen to display something else. I want to basically isolate the units column value </p>
  
  <p>Can't think of a quick and dirty way of doing this without dividing by 100 and subtracting the number of 100s then doing the same with the number of 10s. Is there a simpler way of shifting and testing for 0 to 4 or 5 to 9 in the units column </p>
  
  <p>So far I am trying: </p>
  
  <pre><code>int zero_count_units = a_zero_count - (((a_zero_count / 100) * 100) + ((a_zero_count / 10) * 10));
  
  if( (zero_count_units &gt;= 0) &amp;&amp; (zero_count_units &lt; 5) )     // 0-4 units column
  {
  }
  else if( (zero_count_units &gt;= 5) &amp;&amp; (zero_count_units &lt;= 9) )   // 5-9 units column
  {
  }
  </code></pre>
  
  <p>My brain isn't working particularly well this morning! Any advice appreciated
  Many thanks </p>