title: Filling arrays with prime numbers
body: <p>Hi guys my task is to fill the array with first prime numbers of an entered number N.The size of the array is given..Here is my solution.Thanks a lot guys!
  Here is the output Enter a number: 77
  -858993460 -858993460 2 3 -858993460 5 -858993460 7 -858993460 -858993460 -858993460 11 -858993460 13 Press any key to continue</p>
  
  <pre><code>    #include "stdafx.h"
      #include&lt;iostream&gt;
      using namespace std;
      bool primenumber(int number) {
          int p = 0;
          for (int i = 1; i &lt;= number; i++) {
              if (number%i == 0) {
                  p++;
              }
          }
  
          if (p == 2) {
              return true;
          }
          else {
              return false;
          }
      }
  
      void fillArray(int array[], const int N){
          for (int i = 0; i &lt; N; i++){
              if (primenumber(i))
                  array[i] = i;
          }
      }
      void printArray(int array[], const int N){
          for (int i = 0; i &lt; N; i++){
              cout &lt;&lt; array[i] &lt;&lt; " ";
          }
      }
  
      int _tmain(int argc, _TCHAR* argv[])
      {
          const int N = 14;
          int array[N];
          int number = 0;
          cout &lt;&lt; "Enter a number: ";
          cin &gt;&gt; number;
          fillArray(array, number);
          printArray(array, N);
          system("pause");
          return 0;
      }
  </code></pre>