Hope this helps.
1
9 MONTHS LATER
#include<stdio.h>
int main()
{
int t,i,n[100],f=1,j=1;
for(i=0;i<t;i++)
{
scanf("%d",&n[i]);
while(j<=n[i])
{
f=f*j;
j++;
}
printf("%d\n",f);
}
return 0;
}
can someone tell me whats wrong with the code?
You are asked to calculate factorials of some small positive integers. Input An integer T, denoting the number of testcases, followed by T lines, each containing a single integer N. ...
Read the above editorial and try to understand.
1 MONTH LATER
Okay Thanks