title: && operator behaves like || operator
body: <p>I am a beginner and I've been trying to run a program that prints all the numbers from 1 to N (user input) except for those that are divisible by 3 and 7 at the same time. What my code does instead, however, is that it prints the numbers from 1 to N except for those that are divisible by 3 or 7. I examined it for a while and I have no idea why it does that. Please explain to me where I'm going wrong. </p>
  
  <pre><code>static void Main(string[] args)
  {
      int n = 0;
      int a = 0;
      n = Convert.ToInt32(Console.ReadLine());
      while (a &lt;= n)
      {
          a++;
          if (a % 3 != 0 &amp;&amp; a % 7 != 0)
          {
              Console.WriteLine(a);
          }
      }
      Console.ReadKey();
  }
  </code></pre>
  
  <p>When I reverse the signs of the if statement to <code>==</code> the <code>&amp;&amp;</code> operator works properly, but if the sign is <code>!=</code> it simply acts like an <code>||</code> operator, so that confuses me even more. The issue is most likely in the condition, but I can't see what is wrong with it.</p>