title: Find the number of common factors for n numbers excluding "1" as common factor
body: <p>Here is my code that i have written in gcc. Don't know if my logic is incorrect or i'm making some other mistake.The output is coming as 0 every time.</p>
  
  <pre><code>int main()
  {
  int n,a[20],count=0;
  cin&gt;&gt;n;
  
  for(int i=0;i&lt;n;i++)
  {
      cin&gt;&gt;a[i];
  }
  
  for(int k=0;k&lt;n;k++)
  {
      int c=0;
      for(int j=2;j&lt;n;j++)
      {
          if(a[k]%j==0)
          {
              c++;
          }
          else
          {
              continue;
          }
      }
      if(c==n)
      {
        count++;
      }
  }
  cout&lt;&lt;count;
  }
  </code></pre>