title: C - determine if a number is prime
body: <p>I am trying to come up with a method that takes an integer and returns a boolean to say if the number is prime or not and I don't know much C; would anyone care to give me some pointers?</p>
  
  <p>Basically, I would do this in C# like this:</p>
  
  <pre><code>static bool IsPrime(int number)
  {
      for (int i = 2; i &lt; number; i++)
      {
          if (number % i == 0 &amp;&amp; i != number)
              return false;
      }
      return true;
  }
  </code></pre>