title: Goldbach conjecture exercise (c)
body: <p>My professor asked me to do a program to test the Goldbach conjecture. I am wondering if I should consider 1 as a prime. This is my code that prints the first combination of prime numbers:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;math.h&gt;
  
  int main()
  {
      int n, i, j, k, l;    
      char prime, prime1;
      do   //check if n is even and greater than 2
      {
          printf("Give me an even natural number greater than 2:\n\n&gt;");
          scanf("%d", &amp;n);
      }
      while (n % 2 != 0 &amp;&amp; n &gt;= 2);
      for (i = 1; i &lt; n ; i++) 
      {                   
          prime = 1;     
          for (k = 2; k &lt; i; k++)  
              if (i % k == 0)
                  prime = 0;
          if (prime)
          {
              for (j = 1; j &lt; n; j++)
              {
                  prime1 = 1;
                  for (l = 2; l &lt; j; l++)
                      if (j % l == 0)
                          prime1 = 0;
                  if (prime1)
                      if (i + j == n)
                      {
                          printf("\n\n%d and %d are the first two prime numbers that add up to %d.\n", i, j, n);
                          return 0;
                      }
              }
          }
      }
  }
  </code></pre>
  
  <p>I checked the internet and almost everyone says that 1 is not a prime. What should i do? Keep the program as it is or change it so that it won't consider 1 as a prime? And how do I do that? :P</p>