I have verified all the cases in my compiler but it is not submitting my code please anyone help !!
// Problem Code: FCTRL2
#include <stdlib.h>
#include <stdio.h>
int main()
{
int t, fact, i;
scanf("%d",&t);
int a[t];
for(i=0; i<t; i++)
{
scanf("%d",&a[i]);
fact=1;
if(a[i] == 0)
printf("%d\n",fact);
else
{
while(a[i] != 0)
{
fact = fact*a[i];
a[i]--;
}
printf("%d\n",fact);
}
}
return 0;
}