title: codechef :wrong answer error in smallfactorial
body: <pre><code>#include&lt;stdio.h&gt;
  int fact(int k)
  {
  int j,f=1;
  for(j=1;j&lt;=k;j++)
  f*=j;
  return f;
  }
  int main()
  {
  int t,i,n[100],s[100],j;
  scanf("%d",&amp;t);
  for(i=0;i&lt;t;i++)
  {
  scanf("%d",&amp;n[i]);
  }
  for(j=0;j&lt;t;j++)
  {
  s[j]=fact(n[j]);
  printf("%d \n",s[j]);
  }
  return 0;
  }
  </code></pre>
  
  <p>You are asked to calculate factorials of some small positive integers.
  Input</p>
  
  <p>An integer t, 1&lt;=t&lt;=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1&lt;=n&lt;=100.
  Output</p>
  
  <p>For each integer n given at input, display a line with the value of n!
  Example</p>
  
  <p>Sample input:
  4
  1
  2
  5
  3
  Sample output:
  1
  2
  120
  6</p>