title: My simple C program isn't compiling
body: <p>I'm doing a small exercise for my C class and I'm getting difficulties I know shouldn't really be happening as these are supposed to take like 30 minutes max. Here is my program so far:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdbool.h&gt;
  #define LIMIT 1000000;
  
  bool isPrime( int num ) {
      for ( int factor = 2; factor * factor &lt;= num; factor++ )
        if ( num % factor == 0 )
          return false;
  
      return true;
    }
  
  int main() {
    for ( int num = 2; num &lt;= LIMIT; num++ ) {
      if ( isPrime( num ) ) {
        printf( num );
      }
    }
    return 0;
  }
  </code></pre>
  
  <p>Here is the error I'm getting:</p>
  
  <pre class="lang-none prettyprint-override"><code>primes.c: In function “main”:
  primes.c:14: error: expected expression before “;” token
  primes.c:16: warning: passing argument 1 of “printf” makes pointer from integer without a cast
  /usr/include/stdio.h:361: note: expected “const char * restrict” but argument is of type “int”
  </code></pre>