title: how many times does i occur in x (unsigned 32 bit int C)
body: <p>This is a little bit confusing for me, but I have to see how many times i occurs in x.
  So if someone types 3 for i and x is 4294967295, it should then say 0 times, but if someone types in 9 for i and 4294967295 for x, it should say 3 times.</p>
  
  <p>This is what I have, but output says 0 with 9, so it's not working ..</p>
  
  <pre><code>int main(int argc, char** argv) {
      unsigned int i;
      scanf("%u", &amp;i);
      unsigned int x;
      scanf("%u", &amp;x);
      int output = 0;
      int t = 0;
      while (t &lt; 10) {
          x /= 10;
          if (i == x) {
              output++;
          }
          t++;
      }
      printf("%d", output);
  }
  </code></pre>