title: Prime Number in an Array
body: <p>I am trying to loop through an array and count the number of prime numbers in it...Simple enough but I am missing something... </p>
  
  <pre><code>count = 0;
  for(i =0; i&lt;5; i++)
  {
      flag = true;    // is prime
      for (j=2;j&lt;a[i];j++)
      {
          if(a[i] % j == 0)
          {
              flag = false;
          }
  
  
      }
  
      count ++;
  }
  </code></pre>