title: I wonder what's the explanation of the for loop for(i=2; i<=Number/2; i++)
body: <p>Hi I have a code for getting prime numbers from a specific range, I'm analyzing it since its from the internet, I just wonder what the for loop <code>for(i=2; i&lt;=number/2; i++);</code>. Why does it start with two and what's the reason behind why <code>i&lt;=number/2</code> is the condition. Here is the full code below, I hope you can help me.</p>
  <pre><code>#include &lt;stdio.h&gt;
   
  int main()
  {
    int i, Number, count, Minimum, Maximum; 
  
    printf(&quot;\n Please Enter the Minimum &amp; Maximum Values\n&quot;);
    scanf(&quot;%d %d&quot;, &amp;Minimum, &amp;Maximum);
   
    printf(&quot;Prime Numbers Between %d and %d are:\n&quot;, Minimum, Maximum);  
    for(Number = Minimum; Number &lt;= Maximum; Number++)
    {
      count = 0;
      for (i = 2; i &lt;= Number/2; i++)
      {
        if(Number%i == 0)
        {
      count++;
      break;
        }
      }
      if(count == 0 &amp;&amp; Number != 1 )
      {
         printf(&quot; %d &quot;, Number);
      }  
    
    }
    return 0;
  }
  </code></pre>