hi here is the code…

#include<stdio.h>

#include<stdlib.h>

int fact(int n);

```
int main(void)
{
int t,*numptr,i;
scanf("%d",&t);
if(t<1||t>100)
return 0;
numptr=(int *)malloc(sizeof(t)*t);
for(i=0;i<t;i++)
{
scanf("%d",(numptr+i));
int num=*(numptr+i);
if(num<1||num>100)
return 0;
printf("%d\n",fact(num));
}
return 0;
}
int fact(int n)
{
if(n==1)
return 1;
return n*fact(n-1);
}
```