#include<stdio.h>
int main()
{
int t,a[100],i,f,j;
scanf("%d\n",&t);
for(i=0;i<t;i++)
{
scanf("%d\n",&a[i]);
}
for(i=0;i<t;i++)
{
f=1;
for(j=1;j<=a[i];j++)
{
f=f*j;
}
printf("%d\n",f);
}
return 0;
}
i am not undustanding why it is giving me wrong answer as it is running fine in turbo.
Please include the problem link.