title: Find the largest prime number factor?
body: <p>I need to find
  The prime factors of 13195 are 5, 7, 13 and 29.
  / * Largest is 377. * /
  What is the largest prime factor of the number 600851475143 ?</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      int i, j = 0;
      /*Code works really fine for 13195 or 26*/
      long value, large = 600851475143 /*13195*/;
  
      for(value = (large - 1) ; value &gt;= 3; value--)
      {
          if(large % value == 0)
          {
              /*printf("I am here \n");*/
              if((value % 2 != 0) &amp;&amp; (value % 3 != 0) &amp;&amp; (value % 5 != 0) &amp;&amp; (value % 7 != 0) )   
              {
                  j = 1;
                  break;
              }
          }
      }
  
      if (j == 1)
      {
          printf("%ld", value);
      }
      return 0; 
  }
  </code></pre>
  
  <p>Where it is going wrong?</p>