title: Find missing number between 1 to 100
body: <p>This question has been asked here on SO before with below code </p>
  
  <pre><code>find3missing(int* array)
  { 
      int newarray[100] = {0};
      For i = 0 to 99  
          ++newarray[array[i]] ;
      For i = 0 to 99 
          If newarray[i] != 1
              Cout &lt;&lt; “the missing number is ” &lt;&lt; i+1 &lt;&lt; endl ;
  } 
  </code></pre>
  
  <p>But when I checked this code, it doesn't seem to work. Suppose I have an array of {1,2,6}. The output should be 3,4,5 but with the code above I get 1,4,5,6 instead. Below is my implementation of pseudo code with array size 6.</p>
  
  <pre><code>main()
  {
      int a[6]={1,2,6};
      int tmp[6]={0},i;
      for(i=0;i&lt;6;i++)
      {
          ++tmp[a[i]];
      }
      for(i=0;i&lt;6;i++)
      {
          if(tmp[i]!=1)
          {
              printf("%d",i+1);
          }
      }
  }
  </code></pre>
  
  <p>Is this the right code?</p>