title: c return int value doesn't work
body: <p>This is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;pthread.h&gt;
  
  int num_mezzo_1(int num_orig);
  int num_mezzo_2(int num_orig);
  
  int main(int argc, char *argv[]){
      int num,contatore,tmp=0,tmp_1,tmp_2;
      num=atoi(argv[1]);
      if(num &lt;= 3){
          printf("%d è primo\n", num);
          exit(0);
      }
      else{
          num_mezzo_1(num);
          num_mezzo_2(num);
          tmp=tmp_1+tmp_2;
              //using printf to debug
          printf("t1 %d, t2 %d\n", tmp_1,tmp_2);
          if(tmp&gt;2){
              printf("%d NON è primo\n", num);
          }
          else{
              printf("%d è primo\n", num);
          }
      }
      exit(0);
  }
  
  int num_mezzo_1(int num_orig){
      int tmp_1=0,cont_1;
      for(cont_1=1; cont_1&lt;=(num_orig/2); cont_1++){
          if((num_orig % cont_1) == 0){
              tmp_1++;
          }
      }
      //using printf to debug
      printf("\n%d\n", tmp_1);
      return tmp_1;
  }
  
  int num_mezzo_2(int num_orig){
      int tmp_2=0,cont_2;
      for(cont_2=((num_orig/2)+1); cont_2&lt;=num_orig; cont_2++){
          if((num_orig % cont_2) == 0){
              tmp_2++;
          }
      }
      //using printf to debug
      printf("\n%d\n\n", tmp_2);
      return tmp_2;
  }
  </code></pre>
  
  <p>This program calculates wheter a number is prime or not.<br>
  If i give number 13 as input, the function <code>num_1</code> has value <code>1</code> into <code>tmp_1</code> and function <code>num_2</code> has value <code>1</code> into <code>tmp_2</code> and both are correct.<br>
  The problem is that <code>tmp=tmp_1+tmp_2</code> return a <strong>big big big</strong> value and i don't understand why.</p>