Find the factorial of 1 to 100.

#include <stdio.h>

int main(void) {
      int T,N[100],i,m,carry,x,j,k;
      int a[250];
      a[0]=1;
      carry=0;
      scanf("%d",&T);
      if(T>0&&T<=100)
      {
          for(i=0;i<T;i++)
            scanf("%d",&N[i]);
      for(i=0;i<T;i++)
      {
        if(N[i]>0&&N[i]<=100)
         {
             for(k=1;k<=N[i];k++)
              {
               for(j=0;j<m;j++)
                {
                  x = a[j]*k+carry;
                  a[j]=x%10;
                  carry = x/10;
               }
               while(carry>0)
               {
                  a[m]=carry%10;
                  carry = carry/10;
                  m++;
               }
             }
           }
           for(k=m-1;k>=0;k--)
               printf("%d",a[k]);
           printf("\n");
        }
      }
return 0;
}