title: SPOJ -Small factorials
body: <p><a href="http://www.spoj.com/problems/FCTRL2/" rel="nofollow">http://www.spoj.com/problems/FCTRL2/</a><br>
  My code is showing compilation error in Spoj,although running accurate in my compiler.<br>
  **IDE - Codeblocks **</p>
  
  <pre><code>int cal(int );
  
  
  int main()
  {
    int i,t;
    int n[100];
    scanf("%d",&amp;t);
     for(i=0;i&lt;t;i++)
      {
         scanf("%d",&amp;n[i]);
      }
  
  for(i=0;i&lt;t;i++)
  {
    printf("%d",cal(n[i]));
    printf("\n");
  }
  return 0;
  }
  int cal(int x)
  {
    int j,a=1;
   for(j=x;j&gt;=1;j--)
   {
   a=a*j;
  
  
   }
   return a;
  
  
  }
  </code></pre>